This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42684] ICE when interface operator(xx) available through host and use assoc in module procedure
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jan 2010 02:54:37 -0000
- Subject: [Bug fortran/42684] ICE when interface operator(xx) available through host and use assoc in module procedure
- References: <bug-42684-17837@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2010-01-11 02:54 -------
This patch appears to avoid the problem. I have not looked farther up the call
chain yet to see where passing the NULL in name2 should be avoided completely
for the test case.
Index: interface.c
===================================================================
--- interface.c (revision 155799)
+++ interface.c (working copy)
@@ -955,6 +955,9 @@
{
gfc_formal_arglist *f1, *f2;
+ if (name2 == NULL)
+ return 0;
+
if (s1->attr.function && (s2->attr.subroutine
|| (!s2->attr.function && s2->ts.type == BT_UNKNOWN
&& gfc_get_default_type (name2, s2->ns)->type == BT_UNKNOWN)))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42684