This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47399] ICE with TBP of a PARAMETER


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47399

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-21 20:31:30 UTC ---
The ICE is due to an overly eager ASSERT check and can be removed with the
following patch. 

TODO: A proper check with an error message for the invalid case.

--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1844,5 +1844,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag,
bool sub_flag,

          gcc_assert (!tail || !tail->next);
-         gcc_assert (primary->expr_type == EXPR_VARIABLE);
+         gcc_assert (primary->expr_type == EXPR_VARIABLE
+                     || (primary->expr_type == EXPR_STRUCTURE
+                         && primary->symtree && primary->symtree->n.sym
+                         && primary->symtree->n.sym->attr.flavor));

          if (tbp->n.tb->is_generic)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]