diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20060905-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20060905-1.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20060905-1.c b/gcc/testsuite/gcc.c-torture/execute/20060905-1.c new file mode 100644 index 000000000..eac884fe5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20060905-1.c @@ -0,0 +1,35 @@ +/* PR rtl-optimization/28386 */ +/* Origin: Volker Reichelt <reichelt@gcc.gnu.org> */ + +extern void abort(void); + +volatile char s[256][3]; + +char g; + +static void dummy(char a) +{ + g = a; +} + +static int foo(void) +{ + int i, j=0; + + for (i = 0; i < 256; i++) + if (i >= 128 && i < 256) + { + dummy (s[i - 128][0]); + ++j; + } + + return j; +} + +int main(void) +{ + if (foo () != 128) + abort (); + + return 0; +} |