re PR c++/15069 (a bit test on a variable of enum type is miscompiled)
authorRoger Sayle <roger@eyesopen.com>
Mon, 31 May 2004 17:01:17 +0000 (17:01 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 31 May 2004 17:01:17 +0000 (17:01 +0000)
commit1f7a8dccd4056be197e8f79fe7bbf2b8bd89c53b
treeeac927b74d933af84e28ee45cd568925d8de1411
parent1027314a211e7b0e2b05b6bd8f179c12f784517e
re PR c++/15069 (a bit test on a variable of enum type is miscompiled)

PR middle-end/15069
* fold-const.c (fold_single_bit_test): Only perform "(X & C) != 0"
into "X < 0" (where C is the signbit) if X's type is a full mode.

* g++.dg/opt/fold3.C: New test case.

From-SVN: r82490
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/fold3.C [new file with mode: 0644]