diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr107407.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr107407.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr107407.c b/gcc/testsuite/gcc.dg/torture/pr107407.c new file mode 100644 index 0000000..228fce1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr107407.c @@ -0,0 +1,26 @@ +/* { dg-do run } */ + +int *a; +int c[4]; +int d; + +static int +f(char k, int j) +{ + for (; k <= 3; k++) + { + a = &c[k]; + for (; d <= 1; d++) + *a = 3; + } + *a = 0; +} + +int main() +{ + int i; + f(0, 0); + if (c[0] != 3) + __builtin_abort (); + return 0; +} |