This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
More merge lossage
- To: gcc-bugs at gcc dot gnu dot org
- Subject: More merge lossage
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sun, 31 Oct 1999 23:51:28 -0800
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, charlet at ACT-Europe dot FR
- Reply-to: mark at codesourcery dot com
This change:
Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR>
(rest_of_compilation): If inside an inlined external function,
pretend we are just being declared.
was buggy:
*************** rest_of_compilation (decl)
*** 3571,3578 ****
--- 3577,3597 ----
if (DECL_SAVED_INSNS (decl) == 0)
{
int inlinable = 0;
+ tree parent;
const char *lose;
+ /* If this is nested inside an inlined external function, pretend
+ it was only declared. Since we cannot inline such functions,
+ generating code for this one is not only not necessary but will
+ confuse some debugging output writers. */
+ for (parent = DECL_CONTEXT (current_function_decl);
+ parent != 0; parent = DECL_CONTEXT (parent))
+ if (DECL_INLINE (parent) && DECL_EXTERNAL (parent))
+ {
+ DECL_INITIAL (decl) = 0;
+ goto exit_rest_of_compilation;
+ }
+
/* If requested, consider whether to make this function inline. */
if (DECL_INLINE (decl) || flag_inline_functions)
TIMEVAR (integration_time,
Note that DECL_CONTEXT need not be a DECL; it can also be a TYPE.
This showed up as multiple libio, libstdc++, and g++ test-suite
failures. The testsuites should have been run before this change was
checked in.
With the attached patch we are now seeing approximately the same C++
results as before the merge. There are still problems with
g++.mike/net16.C and libstdc++/tstring.cc on x86; there are aborts in
reg-stack. I'm betting that these are caused by the recent changes
there; I expect Richard will either confirm or deny that sometime in
the next few days.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
Sun Oct 31 23:42:37 1999 Mark Mitchell <mark@codesourcery.com>
* toplev.c (rest_of_compilation): Fix thinko in this change:
Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR>
(rest_of_compilation): If inside an inlined external function,
pretend we are just being declared.
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.249
diff -c -p -r1.249 toplev.c
*** toplev.c 1999/11/01 01:11:21 1.249
--- toplev.c 1999/11/01 06:35:52
*************** rest_of_compilation (decl)
*** 3586,3592 ****
confuse some debugging output writers. */
for (parent = DECL_CONTEXT (current_function_decl);
parent != 0; parent = DECL_CONTEXT (parent))
! if (DECL_INLINE (parent) && DECL_EXTERNAL (parent))
{
DECL_INITIAL (decl) = 0;
goto exit_rest_of_compilation;
--- 3586,3593 ----
confuse some debugging output writers. */
for (parent = DECL_CONTEXT (current_function_decl);
parent != 0; parent = DECL_CONTEXT (parent))
! if (TREE_CODE (parent) == FUNCTION_DECL
! && DECL_INLINE (parent) && DECL_EXTERNAL (parent))
{
DECL_INITIAL (decl) = 0;
goto exit_rest_of_compilation;