This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Jan 2014 17:58:02 +0000
- Subject: [Bug fortran/59941] [4.7 Regression] [OOP] ICE with polymorphic types
- Auto-submitted: auto-generated
- References: <bug-59941-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59941
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org
--- Comment #12 from janus at gcc dot gnu.org ---
Here is a more lightweight fix (pretty much straightforward):
Index: gcc/fortran/expr.c
===================================================================
--- gcc/fortran/expr.c (revision 207198)
+++ gcc/fortran/expr.c (working copy)
@@ -4195,7 +4195,7 @@ replace_comp (gfc_expr *expr, gfc_symbol *sym, int
gfc_component *comp;
comp = (gfc_component *)sym;
if ((expr->expr_type == EXPR_VARIABLE
- || (expr->expr_type == EXPR_FUNCTION
+ || (expr->expr_type == EXPR_FUNCTION && !expr->value.function.isym
&& !gfc_is_intrinsic (expr->symtree->n.sym, 0, expr->where)))
&& expr->symtree->n.sym->ns == comp->ts.interface->formal_ns)
{
Removes the ICE on comment 0, comment 5 and comment 7.