From: Eric Botcazou Date: Tue, 5 Sep 2006 07:05:08 +0000 (+0200) Subject: 20060905-1.c: New test. X-Git-Tag: releases/gcc-4.2.0~1537 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd89bc3f91a3514520acff955f9342a42db190c9;p=thirdparty%2Fgcc.git 20060905-1.c: New test. * gcc.c-torture/execute/20060905-1.c: New test. From-SVN: r116692 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0355796a543b..a2b7e9cd9c8b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-09-05 Eric Botcazou + + * gcc.c-torture/execute/20060905-1.c: New test. + 2006-09-05 Paul Thomas PR fortran/28908 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 000000000000..eac884fe5f6c --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20060905-1.c @@ -0,0 +1,35 @@ +/* PR rtl-optimization/28386 */ +/* Origin: Volker Reichelt */ + +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; +}