[Bug fortran/86417] [9 Regression] FAIL: libgomp.fortran/alloc-comp-3.f90 -O0 (test for excess errors)
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 8 18:32:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86417
--- Comment #9 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #8)
> Caused/exposed by revision r262442.
Thanks for the info, Dominique.
The following patch seems to be sufficient to fix the regression:
Index: expr.c
===================================================================
--- expr.c (revision 262446)
+++ expr.c (working copy)
@@ -4648,6 +4648,8 @@ gfc_generate_initializer (gfc_typespec *ts, bool g
if (val == false)
return NULL;
}
+ if (!ctor->expr->where.nextc || !ctor->expr->where.lb)
+ ctor->expr->where = init->where;
}
gfc_constructor_append (&init->value.constructor, ctor);
More information about the Gcc-bugs
mailing list