diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/20000614-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/20000614-2.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/20000614-2.c b/gcc/testsuite/gcc.target/i386/20000614-2.c new file mode 100644 index 00000000000..eb30fc6cd55 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/20000614-2.c @@ -0,0 +1,33 @@ +/* { dg-do run { target i?86-*-* x86_64-*-*} } */ +/* { dg-options "-O2 -fno-strength-reduce" } */ + +extern void abort (void); +extern void exit (int); + +char buf[8]; + +void bar(char *p) +{ +} + +int main() +{ + union { + unsigned int val; + unsigned char p[4]; + } serial; + + int i; + serial.val = 0; + bar(buf); + for(i = 0; i < 8; i += 4) + { + serial.p [0] += buf [i + 0]; + serial.p [1] += buf [i + 1]; + serial.p [2] += buf [i + 2]; + serial.p [3] += buf [i + 3]; + } + if (serial.val) + abort(); + exit(0); +} |