diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386/pr47800.c')
-rw-r--r-- | gcc-4.8/gcc/testsuite/gcc.target/i386/pr47800.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/pr47800.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr47800.c new file mode 100644 index 000000000..45c817bc6 --- /dev/null +++ b/gcc-4.8/gcc/testsuite/gcc.target/i386/pr47800.c @@ -0,0 +1,15 @@ +/* PR target/47800 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=nocona" } */ + +int +foo (unsigned char *x, unsigned char *y) +{ + unsigned char a; + for (a = 0; x < y; x++) + if (a & 0x80) + a = (unsigned char) (a << 1) + 1 + *x; + else + a = (unsigned char) (a << 1) + *x; + return a; +} |