http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60450
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org --- Comment #3 from janus at gcc dot gnu.org --- The following patch is sufficient to fix it on 4.8: Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 208401) +++ gcc/fortran/simplify.c (working copy) @@ -5528,7 +5528,7 @@ gfc_simplify_shape (gfc_expr *source, gfc_expr *ki if (e == &gfc_bad_expr || range_check (e, "SHAPE") == &gfc_bad_expr) { gfc_free_expr (result); - if (t) + if (t == SUCCESS) gfc_clear_shape (shape, source->rank); return &gfc_bad_expr; } @@ -5536,7 +5536,7 @@ gfc_simplify_shape (gfc_expr *source, gfc_expr *ki gfc_constructor_append_expr (&result->value.constructor, e, NULL); } - if (t) + if (t == SUCCESS) gfc_clear_shape (shape, source->rank); return result; On trunk, 't' was changed from 'gfc_try' to bool in r197682, which also fixed the problem.