This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47399] ICE with TBP of a PARAMETER
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Jan 2011 20:31:55 +0000
- Subject: [Bug fortran/47399] ICE with TBP of a PARAMETER
- Auto-submitted: auto-generated
- References: <bug-47399-4@http.gcc.gnu.org/bugzilla/>
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)