re PR rtl-optimization/14669 (Wrong code with -O for enum values expression E4 <...
authorRoger Sayle <sayle@gcc.gnu.org>
Tue, 23 Mar 2004 14:26:43 +0000 (14:26 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 23 Mar 2004 14:26:43 +0000 (14:26 +0000)
commitbb3a37acf0479f9d12c64852163b02cb63fef69e
tree5d31569a0dac072a9ef9e7c480f9f8ab8d3fe778
parentf2c79f80f2c92c9fca4632598e019c09903075ca
re PR rtl-optimization/14669 (Wrong code with -O for enum values expression E4 <= t && t <= E6)

2004-03-23  Kazu Hirata  <kazu@cs.umass.edu>

PR optimization/14669
* fold-const.c (fold): Only unwiden integer comparisons for equality
or inequality operators, or when the signedness is the same.

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

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