From: Nick Clifton Date: Thu, 23 Sep 1999 14:58:00 +0000 (+0000) Subject: Add test case for this patch to combine.c: X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8540d767f7e9fcd91b13f883cd2681929e94901;p=gcc.git Add test case for this patch to combine.c: * combine.c (simplify_comparison): Use an unsigned shift to adjust the constant. From-SVN: r29620 --- diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog index 5c2051b7505..d4a4dd8ad1d 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog +++ b/gcc/testsuite/gcc.c-torture/ChangeLog @@ -1,3 +1,7 @@ +1999-09-23 Nick Clifton + + * execute/990923-1.c: New test. + 1999-09-21 Nick Clifton * special/special.exp: Add FR30 to list of targets for which -fpic diff --git a/gcc/testsuite/gcc.c-torture/execute/990923-1.c b/gcc/testsuite/gcc.c-torture/execute/990923-1.c new file mode 100644 index 00000000000..4f4e87abcf4 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/990923-1.c @@ -0,0 +1,19 @@ +#define mask 0xffff0000L +#define value 0xabcd0000L + +long +foo (long x) +{ + if ((x & mask) == value) + return x & 0xffffL; + return 1; +} + +int +main (void) +{ + if (foo (value) != 0 || foo (0) != 1) + abort (); + + exit (0); +}