aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c
new file mode 100644
index 000000000..356818f9e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010426-1.c
@@ -0,0 +1,19 @@
+struct { char *m; long n; } a[20];
+int b = 20, c;
+void bar(void) __attribute__((__noreturn__));
+
+int
+foo(int x)
+{
+ int i;
+
+ for (i = 0; i < x; i++)
+ {
+ a[0].m = "a"; a[0].n = 10; c=1;
+ a[c].m = "b"; a[c].n = 32; c++;
+ if (c >= b) bar ();
+ a[c].m = "c"; a[c].n = 80; c++;
+ if (c >= b) bar ();
+ }
+ return 0;
+}