[Bug fortran/42051] [OOP] ICE on array-valued function with CLASS formal argument
pault at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 3 21:28:00 GMT 2009
------- Comment #3 from pault at gcc dot gnu dot org 2009-12-03 21:28 -------
The smaller testcase of comment #1 is fixed with
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c (revision 154935)
+++ gcc/fortran/trans-expr.c (working copy)
@@ -2446,12 +2446,14 @@
ss = gfc_walk_expr (e);
if (ss == gfc_ss_terminator)
{
+ parmse->ss = NULL;
gfc_conv_expr_reference (parmse, e);
tmp = fold_convert (TREE_TYPE (ctree), parmse->expr);
gfc_add_modify (&parmse->pre, ctree, tmp);
}
else
{
+ parmse->ss = ss;
gfc_conv_expr (parmse, e);
gfc_add_modify (&parmse->pre, ctree, parmse->expr);
}
The original fails because the vtable cannot be found. THis is due to:
use grid_module, only : grid
Removing the ",only : grid" restores correct linkage.
I knew that we would hit this before long, so now is as good a time as any to
fix it:-)
Cheers
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-03 21:28:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42051
More information about the Gcc-bugs
mailing list