[Bug fortran/51758] ICE with optional arguments of elemental procedures

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 6 15:56:00 GMT 2012


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)



More information about the Gcc-bugs mailing list