This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: "*INTERNAL*" appended to function name bootstrap failure
- From: Andreas Jaeger <aj at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>,Nathan Sidwell <nathan at codesourcery dot com>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 05 Dec 2001 14:35:30 +0100
- Subject: Re: "*INTERNAL*" appended to function name bootstrap failure
- References: <33380000.1007494314@warlock.codesourcery.com>
Mark Mitchell <mark@codesourcery.com> 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 <aoliva@redhat.com>
+ * 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