[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #8 from Marek Polacek --- Author: mpolacek Date: Fri Feb 17 09:51:38 2017 New Revision: 245526 URL: https://gcc.gnu.org/viewcvs?rev=245526=gcc=rev Log: PR middle-end/79536 * fold-const.c (fold_negate_expr_1): Renamed

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #7 from rguenther at suse dot de --- On Thu, 16 Feb 2017, mpolacek at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 > > --- Comment #6 from Marek Polacek --- > Yes, but see my Comment 3 regarding

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #6 from Marek Polacek --- Yes, but see my Comment 3 regarding STRIP_SIGN_NOPS. Also the typedef is necessary, otherwise there are no NOP_EXPRs (huh).

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 Richard Biener changed: What|Removed |Added Priority|P3 |P2

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #5 from Richard Biener --- (In reply to Marek Polacek from comment #4) > So perhaps this: > --- a/gcc/fold-const.c > +++ b/gcc/fold-const.c > @@ -581,8 +581,8 @@ fold_negate_expr (location_t loc, tree t) > case COMPLEX_EXPR: >

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #4 from Marek Polacek --- So perhaps this: --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -581,8 +581,8 @@ fold_negate_expr (location_t loc, tree t) case COMPLEX_EXPR: if (negate_expr_p (t)) return fold_build2_loc

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 --- Comment #3 from Marek Polacek --- The problem here is that we have a NOP_EXPR: (int) -x. negate_expr_p returns true for that, which means that fold_negate_expr cannot return NULL_TREE. But that's what happens, and that leads to a crash in

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

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

[Bug middle-end/79536] [5/6/7 Regression] ICE in fold_binary_loc, at fold-const.c:9060

2017-02-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79536 Marek Polacek changed: What|Removed |Added Keywords||ice-on-valid-code Component|c