This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34848] [4.3 Regression] internal compiler error with optional argument of character type and array return type
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2008 20:06:45 -0000
- Subject: [Bug fortran/34848] [4.3 Regression] internal compiler error with optional argument of character type and array return type
- References: <bug-34848-9178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from burnus at gcc dot gnu dot org 2008-01-26 20:06 -------
The following does no longer fix PR34868 but it seems to have no regressions.
"e" is the expression holding the actual argument; if it is NULL it means the
argument is absent. (This is handled before, including passing then the string
length "0".)
Index: trans-expr.c
===================================================================
--- trans-expr.c (Revision 131874)
+++ trans-expr.c (Arbeitskopie)
@@ -2506,7 +2506,7 @@ gfc_conv_function_call (gfc_se * se, gfc
}
}
- if (fsym && need_interface_mapping)
+ if (fsym && need_interface_mapping && e)
gfc_add_interface_mapping (&mapping, fsym, &parmse, e);
gfc_add_block_to_block (&se->pre, &parmse.pre);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34848