fold-const.c (size_binop): In the fast-paths for X+0...
authorRoger Sayle <roger@eyesopen.com>
Sun, 28 Jan 2007 03:48:41 +0000 (03:48 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 28 Jan 2007 03:48:41 +0000 (03:48 +0000)
commit74890d7bbdacf14edfcd1e50bac0e5053a2bdf53
tree79ff0e900f4c8f77577ddfd6116f7f43015bdc5c
parent5e851559ad1c6b61d9b13b62a6f5bb536c5fbca1
fold-const.c (size_binop): In the fast-paths for X+0...

* 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.

From-SVN: r121252
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/large-size-array-3.c [new file with mode: 0644]