This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51758] ICE with optional arguments of elemental procedures
- 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, 06 Jan 2012 15:55:36 +0000
- Subject: [Bug fortran/51758] ICE with optional arguments of elemental procedures
- Auto-submitted: auto-generated
- References: <bug-51758-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51758
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-06 15:55:36 UTC ---
Draft patch.
--- trans-expr.c (revision 182957)
+++ trans-expr.c (working copy)
@@ -3408,6 +3408,9 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol *
parmse.expr = null_pointer_node;
if (arg->missing_arg_type == BT_CHARACTER)
parmse.string_length = build_int_cst (gfc_charlen_type_node, 0);
+ if (se->ss && (se->ss->info->type == GFC_SS_SCALAR
+ || se->ss->info->type == GFC_SS_REFERENCE))
+ gfc_advance_se_ss_chain (se);
}
else if (fsym && fsym->ts.type == BT_CLASS
&& e->ts.type == BT_DERIVED)