[Bug fortran/88073] Internal compiler error compiling WHERE construct with -O or -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88073 Dominique d'Humieres changed: What|Removed |Added Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed||2018-11-17 CC||tkoenig at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- The code compiles with 4.8, but not with 4.9 up to trunk. Workaround: compile with -fno-frontend-optimize.
[Bug fortran/88073] Internal compiler error compiling WHERE construct with -O or -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88073 Thomas Koenig changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |tkoenig at gcc dot gnu.org --- Comment #2 from Thomas Koenig --- I'll commit the following as obvious, probably today. === --- frontend-passes.c (Revision 266250) +++ frontend-passes.c (Arbeitskopie) @@ -1773,6 +1773,10 @@ combine_array_constructor (gfc_expr *e) if (iterator_level > 0) return false; + /* WHERE also doesn't work. */ + if (in_where > 0) +return false; + op1 = e->value.op.op1; op2 = e->value.op.op2;
[Bug fortran/88073] Internal compiler error compiling WHERE construct with -O or -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88073 --- Comment #3 from Thomas Koenig --- Author: tkoenig Date: Sun Nov 18 17:40:23 2018 New Revision: 266251 URL: https://gcc.gnu.org/viewcvs?rev=266251&root=gcc&view=rev Log: 2018-11-18 Thomas Koenig PR fortran/88073 * frontend-passes.c (combine_array_constructor): Do not do anything if in a WHERE statement. 2018-11-18 Thomas Koenig PR fortran/88073 * gfortran.dg/where_7.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/where_7.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/frontend-passes.c trunk/gcc/testsuite/ChangeLog