]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/33691 (Type checking error with bitwise and/or)
authorRichard Guenther <rguenther@suse.de>
Mon, 8 Oct 2007 14:44:14 +0000 (14:44 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 8 Oct 2007 14:44:14 +0000 (14:44 +0000)
commit8174836f1ebff55e127300c942adf3e689d3d3d4
treefed6dbf121ef1138a33f97ed54004b0db8ff84e0
parent7b6cb84335d934861a6058e2751435fbad61191d
re PR middle-end/33691 (Type checking error with bitwise and/or)

2007-10-08  Richard Guenther  <rguenther@suse.de>

PR middle-end/33691
PR middle-end/33694
PR middle-end/33696
* fold-const.c (fold_binary): Use the correct types when
folding (A | CST1) & CST2 to (A & CST2) | (CST1 & CST2).
(fold_binary): Use the correct types when folding
(-A) - B to (-B) - A.
(fold_unary): Use the correct types when folding ~(X).

* gcc.dg/pr33691.c: New testcase.
        * gcc.dg/pr33694.c: Likewise.
        * gcc.dg/pr33696.c: Likewise.

From-SVN: r129128
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr33691.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr33694.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr33696.c [new file with mode: 0644]