diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20040805-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20040805-1.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040805-1.c b/gcc/testsuite/gcc.c-torture/execute/20040805-1.c new file mode 100644 index 000000000..f09fc49a2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040805-1.c @@ -0,0 +1,31 @@ +#if __INT_MAX__ < 32768 || (defined(STACK_SIZE) && STACK_SIZE < 0x12000) +int main () { exit (0); } +#else +int a[2] = { 2, 3 }; + +static int __attribute__((noinline)) +bar (int x, void *b) +{ + a[0]++; + return x; +} + +static int __attribute__((noinline)) +foo (int x) +{ + char buf[0x10000]; + int y = a[0]; + a[1] = y; + x = bar (x, buf); + y = bar (y, buf); + return x + y; +} + +int +main () +{ + if (foo (100) != 102) + abort (); + exit (0); +} +#endif |