[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-26 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 --- Comment #8 from Marek Polacek --- Author: mpolacek Date: Wed Jul 26 11:53:17 2017 New Revision: 250566 URL: https://gcc.gnu.org/viewcvs?rev=250566&root=gcc&view=rev Log: PR middle-end/70992 * tree.c (build2_stat): Don't set T

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 --- Comment #7 from Marek Polacek --- We can simply do: --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9387,6 +9387,11 @@ fold_binary_loc (location_t loc, TREE_TYPE (arg0), arg0, cst0

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-17 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org --- Comm

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2017-07-11 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Arseny Solokha changed: What|Removed |Added Known to fail||8.0 --- Comment #4 from Arseny Solokha

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2016-05-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 --- Comment #3 from Richard Biener --- The bad recursion happens between extract_muldiv_1 /* The last case is if we are a multiply. In that case, we can apply the distributive law to commute the multiply and addition if

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2016-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 --- Comment #2 from Richard Biener --- I think the issue is that the associate case treats (0 % 0 + 1) * 2 as constant but that gets further "simplified" when combined with the rest. In the end our refusal to simplify 0 % 0 to 0 causes things to

[Bug middle-end/70992] Infinite recursion between fold_build2_stat_loc and fold_binary_loc w/ -fwrapv

2016-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70992 Richard Biener changed: What|Removed |Added Keywords|ice-on-invalid-code |ice-on-valid-code Status|UN