From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2551 invoked by alias); 2 Jan 2008 21:10:15 -0000 Received: (qmail 2541 invoked by uid 22791); 2 Jan 2008 21:10:14 -0000 X-Spam-Check-By: sourceware.org Received: from server1.sourceware.org (HELO localhost.localdomain) (127.0.0.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Jan 2008 21:04:57 +0000 Subject: [Bug fortran/34545] ICE when compiling Fortran 95 code In-Reply-To: X-Mailer: Mail::Mailer[v1.74] Net::SMTP[v2.29] X-Bugzilla-Reason: CC References: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault 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 Date: Wed, 02 Jan 2008 21:57:00 -0000 X-SW-Source: 2008-01/txt/msg00110.txt.bz2 Message-ID: <20080102215700.5df4KWjt4Qb_lBkK48DU72HgM-0ayQrsBXKBtwDbp3E@z> ------- Comment #14 from pault at gcc dot gnu dot org 2008-01-02 21:00 ------- (In reply to comment #13) > The patch in comment #12 works as advertised without regression in 32 and 64 > bit modes on ppc/Intel and my favourite platform. > Thanks for the test. I have been through several variants and think that this is the most hygenic: Index: gcc/fortran/module.c =================================================================== *** gcc/fortran/module.c (revision 131237) --- gcc/fortran/module.c (working copy) *************** load_needed (pointer_info *p) *** 3525,3530 **** --- 3525,3536 ---- associate_integer_pointer (q, ns); } + /* Use the module sym as 'proc_name' so that gfc_get_symbol_decl + doesn't go pear-shaped if the symbol is used. */ + if (!ns->proc_name) + gfc_find_symbol (p->u.rsym.module, gfc_current_ns, + 1, &ns->proc_name); + sym = gfc_new_symbol (p->u.rsym.true_name, ns); sym->module = gfc_get_string (p->u.rsym.module); strcpy (sym->binding_label, p->u.rsym.binding_label); I'm going to regtest in a few minutes but I'm confident that it's OK. It has the advantage too that -fdump-parse-tree produces soemthing useful. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34545