* fold-const.c (size_binop): In the fast-paths for X+0, 0+X, X-0 and
commit6117e4152254104e118e366d56afdfcc83e2b473
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Jan 2007 03:48:41 +0000 (28 03:48 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Jan 2007 03:48:41 +0000 (28 03:48 +0000)
tree79ff0e900f4c8f77577ddfd6116f7f43015bdc5c
parent5a8c5b9f0cc1695553343168f0032bdd29d349ab
* fold-const.c (size_binop): In the fast-paths for X+0, 0+X, X-0 and
1*X check that the constant hasn't overflowed, to preserve the
TREE_OVERFLOW bit.
(round_up): Provide an efficient implementation when rouding-up an
INTEGER_CST to a power-of-two.

* gcc-dg/large-size-array-3.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121252 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/large-size-array-3.c [new file with mode: 0644]