re PR tree-optimization/58088 (ICE in gcc.c)
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 17 Sep 2013 13:29:41 +0000 (13:29 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Tue, 17 Sep 2013 13:29:41 +0000 (13:29 +0000)
commite3d3cfb4a5ac9560c78662c36568fde2675b201f
treec7ad9c99c8373202fc0c56229c3ab24d5189bba2
parent4fce5f027cf84b6237b6f7d90b3b00f7ab7ca4d4
re PR tree-optimization/58088 (ICE in gcc.c)

[gcc/]
2013-09-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR tree-optimization/58088
* fold-const.c (mask_with_trailing_zeros): New function.
(fold_binary_loc): Make sure we don't recurse infinitely
when the X in (X & C1) | C2 is a tree of the form (Y * K1) & K2.
Use mask_with_trailing_zeros where appropriate.

[gcc/testsuite]
2013-09-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR tree-optimization/58088
* gcc.c-torture/compile/pr58088.c: New test.

From-SVN: r202652
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr58088.c [new file with mode: 0644]