http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54730
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #7 from Mikael Morin <mikael at gcc dot gnu.org> 2013-01-14
22:23:20 UTC ---
Untested patch:
diff --git a/array.c b/array.c
index 6787c05..54fe337 100644
--- a/array.c
+++ b/array.c
@@ -1074,7 +1074,10 @@ gfc_match_array_constructor (gfc_expr **result)
/* Try to match an optional "type-spec ::" */
gfc_clear_ts (&ts);
- if (gfc_match_decl_type_spec (&ts, 0) == MATCH_YES)
+ m = gfc_match_decl_type_spec (&ts, 0);
+ if (m != MATCH_YES)
+ goto cleanup;
+ else
{
seen_ts = (gfc_match (" ::") == MATCH_YES);