aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c
new file mode 100644
index 000000000..4a48bc559
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr45860.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+
+void
+foo (char *str, int i)
+{
+ static const char text[] = "";
+ str[i] = 0;
+ if (i & 1)
+ __builtin_strcpy (str + i, text);
+}
+