From: Jeff Law Date: Thu, 9 May 2002 13:33:58 +0000 (-0600) Subject: re PR rtl-optimization/3311 (GCC-SH: gcc loses result of AND operation due to force_t... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a08cbd59a60d1428c46dcbcb00f7c2dc5a0681d7;p=gcc.git re PR rtl-optimization/3311 (GCC-SH: gcc loses result of AND operation due to force_to_mode bug) Forgot to commit long long ago. See my message to gcc-patches from Mar 28 :-) Testcase for PR 3311. From-SVN: r53328 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bcecf51d0ac..5e060c43db8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -487,6 +487,10 @@ Wed Apr 24 21:38:36 2002 J"orn Rennecke * g++.old-deja/g++.law/bit-fields2.C: Skip on mmix-knuth-mmixware. +Thu Mar 28 16:38:09 2002 Jeffrey A Law (law@redhat.com) + + * gcc.c-torture/execute/20020328-1.c: New test. + 2002-03-27 Richard Henderson * g++.dg/ext/instantiate1.C: Use scan-assembler, not link errors. diff --git a/gcc/testsuite/gcc.c-torture/execute/20020328-1.c b/gcc/testsuite/gcc.c-torture/execute/20020328-1.c new file mode 100644 index 00000000000..4b6f2bf4e21 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20020328-1.c @@ -0,0 +1,25 @@ +int b = 0; + +func () { } + +void +testit(int x) +{ + if (x != 20) + abort (); +} + +int +main() + +{ + int a = 0; + + if (b) + func(); + + /* simplify_and_const_int would incorrectly omit the mask in + the line below. */ + testit ((a + 23) & 0xfffffffc); + exit (0); +}