diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20010426-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20010426-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010426-1.c b/gcc/testsuite/gcc.c-torture/compile/20010426-1.c new file mode 100644 index 00000000000..356818f9ec8 --- /dev/null +++ b/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; +} |