From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5227 invoked by alias); 11 Jan 2010 02:54:54 -0000 Received: (qmail 5102 invoked by uid 48); 11 Jan 2010 02:54:37 -0000 Date: Mon, 11 Jan 2010 02:54:00 -0000 Message-ID: <20100111025437.5101.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42684] ICE when interface operator(xx) available through host and use assoc in module procedure In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg01190.txt.bz2 ------- 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