From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4051 invoked by alias); 5 Dec 2001 13:35:33 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4025 invoked from network); 5 Dec 2001 13:35:32 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 5 Dec 2001 13:35:32 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id 6881C1E107; Wed, 5 Dec 2001 14:35:31 +0100 (MET) X-Authentication-Warning: gee.suse.de: aj set sender to aj@suse.de using -f Mail-Copies-To: never To: Mark Mitchell Cc: David Edelsohn , Nathan Sidwell , "gcc@gcc.gnu.org" Subject: Re: "*INTERNAL*" appended to function name bootstrap failure References: <33380000.1007494314@warlock.codesourcery.com> From: Andreas Jaeger Date: Wed, 05 Dec 2001 05:35:00 -0000 In-Reply-To: <33380000.1007494314@warlock.codesourcery.com> (Mark Mitchell's message of "Tue, 04 Dec 2001 11:31:54 -0800") Message-ID: User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial Intelligence, i386-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2001-12/txt/msg00207.txt.bz2 Mark Mitchell writes: >> Guess what? We're emitting it! > > Find the change that started causing this, and then we can fix it. I get the same problem on i686-linux, my SPECcpu tester has the same problem: /opt/gcc-3.1-devel/bin/g++ -c -o mrGrid.o -DHAS_ERRLIST -DFMAX_IS_DOUBLE -ffast-math -fwritable-strings -Wno-deprecated -Wno-non-template-friend -I. -DNDEBUG -O2 -march=athlon -malign-double mrGrid.cc /tmp/ccootV1g.s: Assembler messages: /tmp/ccootV1g.s:842: Warning: missing operand; zero assumed /tmp/ccootV1g.s:842: Error: undefined symbol `INTERNAL' in operation Looking throught the log files, it should be part of this diff: http://www.suse.de/~aj/SPEC/CINT/d-permanent/200112041728.int/gcc-200112041728.diff.bz2 The only non ada diff is the appended patch. I hope that my scripts are correct and that this is really the relevant bit. Alexandre, can you have a look, please? Andreas Index: gcc/ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v retrieving revision 1.12137 retrieving revision 1.12138 diff -c -p -r1.12137 -r1.12138 *** ChangeLog 2001/12/04 15:09:51 1.12137 --- ChangeLog 2001/12/04 17:10:57 1.12138 *************** *** 1,5 **** --- 1,8 ---- 2001-12-04 Alexandre Oliva + * tree.c (get_callee_fndecl): Only use DECL_ABSTRACT_ORIGIN if + it has DECL_SAVED_TREE. + * c-decl.c (duplicate_decls): Revert rth's patch. If newdecl is in a different binding level, get its abstract origin to be olddecl. Index: gcc/tree.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree.c,v retrieving revision 1.224 retrieving revision 1.225 diff -c -p -r1.224 -r1.225 *** tree.c 2001/12/04 10:34:40 1.224 --- tree.c 2001/12/04 17:11:05 1.225 *************** get_callee_fndecl (call) *** 4379,4390 **** if (TREE_CODE (addr) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL) { ! addr = TREE_OPERAND (addr, 0); ! if (! DECL_INITIAL (addr) && DECL_ABSTRACT_ORIGIN (addr)) ! addr = DECL_ABSTRACT_ORIGIN (addr); ! return addr; } /* We couldn't figure out what was being called. */ --- 4379,4399 ---- if (TREE_CODE (addr) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL) { ! tree fn = TREE_OPERAND (addr, 0); ! /* If fn is a declaration of a function in a nested scope that ! was globally declared inline, we don't set its DECL_INITIAL. ! However, we can't blindly follow DECL_ABSTRACT_ORIGIN because ! the C++ front-end uses it for cdtors to refer to their ! internal declarations, that are not real functions. ! Fortunately those don't have trees to be saved, so we can tell by ! checking their DECL_SAVED_TREE. */ ! if (! DECL_INITIAL (fn) ! && DECL_ABSTRACT_ORIGIN (fn) ! && DECL_SAVED_TREE (DECL_ABSTRACT_ORIGIN (fn))) ! fn = DECL_ABSTRACT_ORIGIN (fn); ! return fn; } /* We couldn't figure out what was being called. */ -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj