[Bug fortran/82620] [PDT] ICE: free_expr0(): Bad expr type (at fortran/expr.c:497)
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Oct 19 18:28:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82620
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
Index: match.c
===================================================================
--- match.c (revision 253587)
+++ match.c (working copy)
@@ -3968,7 +3968,10 @@ gfc_match_allocate (void)
saw_stat = saw_errmsg = saw_source = saw_mold = saw_deferred = false;
if (gfc_match_char ('(') != MATCH_YES)
- goto syntax;
+ {
+ gfc_syntax_error (ST_ALLOCATE);
+ return MATCH_NO;
+ }
/* Match an optional type-spec. */
old_locus = gfc_current_locus;
@@ -4318,7 +4321,8 @@ cleanup:
gfc_free_expr (source);
gfc_free_expr (stat);
gfc_free_expr (mold);
- if (tmp && tmp->expr_type) gfc_free_expr (tmp);
+ if (tmp && tmp->expr_type)
+ gfc_free_expr (tmp);
gfc_free_alloc_list (head);
if (type_param_spec_list)
% gfcx -c d.f90
d.f90:7:11:
allocate)t(7) :: y)
1
Error: Syntax error in ALLOCATE statement at (1)
%
More information about the Gcc-bugs
mailing list