https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71887
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2016-07-15
Target Milestone|--- |7.0
Summary|wrong code (SIGFPE) at -O1 |[7 Regression] wrong code
|and above on |(SIGFPE) at -O1 and above
|x86_64-linux-gnu (in both |on x86_64-linux-gnu (in
|32-bit and 64-bit modes) |both 32-bit and 64-bit
| |modes)
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.
2016-07-13 Richard Biener <rguent...@suse.de>
PR tree-optimization/24574
* tree-ssa-phiopt.c (absorbing_element_p): Pass in argument
position and add shift, rotate, divison and modulo support
for left zero.
(value_replacement): Pass in argument position to absorbing_element_p.
this didn't consider that we might divide/modulo by zero and have that guarded
(implicitely) by a guard on the left-hand value. In the testcase it's quite
explicit though:
if (c_5 == 0)
goto <bb 4>;
else
goto <bb 3>;
<bb 3>:
_2 = c_5 % c_5;
<bb 4>:
# _6 = PHI <0(2), _2(3)>