http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60341
Mikael Morin <mikael at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikael at gcc dot gnu.org --- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> --- Looks like an unguarded union access. This is a regression from the time there was now front-end optimization I guess? diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 52bd700..e663868 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -1391,7 +1391,9 @@ optimize_comparison (gfc_expr *e, gfc_intrinsic_op op) /* Replace A // B < A // C with B < C, and A // B < C // B with A < C. */ if (op1->ts.type == BT_CHARACTER && op2->ts.type == BT_CHARACTER + && op1->expr_type == EXPR_OP && op1->value.op.op == INTRINSIC_CONCAT + && op2->expr_type == EXPR_OP && op2->value.op.op == INTRINSIC_CONCAT) { gfc_expr *op1_left = op1->value.op.op1;