public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@cygnus.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: wilson@redhat.com, schwab@suse.de, gcc@gcc.gnu.org
Subject: Re: Bootstrap failure of gcc-ss-20010409 in ia64
Date: Sat, 14 Apr 2001 02:01:00 -0000	[thread overview]
Message-ID: <200104140901.CAA05718@wilson.cygnus.com> (raw)
In-Reply-To: <200104140259.TAA32201@wilson.cygnus.com>

My libffi problems are because it has been too long since I last did a cvs co
on my main gcc tree.  I normally just do a cvs update, but that doesn't give
you new directories.  After doing a cvs co to get new directories, libffi now
configures and builds as it should.  There are two libffi build problems, but
both are trivial to fix.  I have patches for both, but have not tested them
yet.

Meanwhile, I've spent about 4 hours looking at the dwarf2out.c abort.
Mostly all I accomplished was to remember how it works, but I did learn a
few things.

The problem is with <var_decl 0x401f4ea0 __exception_info> which is nested
inside a base_ctor function.  This var_decl has an abstract origin of
<var_decl 0x401d5f08 __exception_info> which has a context of
<function_decl 0x401b8ea0 _M_refcopy>.  When we try to add an abtract_origin
attribute pointing at the 0x401d5f08 decl, we first call dwarf2out_abstract_
function on _M_refcopy.  Unfortunately, there is no __execption_info var_decl
inside the _M_refcopy block tree, and thus we still have no origin_die, and
we hit the abort.  This is definitely fishy.  We have a decl that claims to
be inside a function, but the function claims to not know anything about the
decl.  I will have to investigate this further.

I can throw out a few wild guesses though, based on the fact that the problem
goes away when -freorder-blocks is turned off.
a) We generate a M_refcopy function that contains a __exception_info variable.
   We inline this into another function, generating an exception_info var
   with an abstract origin pointing back to us.  We then optimize and emit
   M_refcopy, and in the process of doing so, the block tree is modified such
   that the exception_info variable no longer exists.  We then later try to
   emit debug info for the inlinee, and we find a decl whose abstract origin
   no longer exists.  This problem does not exist with the RTL inliner, because
   we make a copy of the inline function before optimizing and emitting it,
   and hence all abstract origin pointers back to us remain valid.
b) We generate a M_refcopy function that does not contain a __exception_info
   variable.  We inline this into another function that does contain an
   _exception_info variable in other blocks.  We then optimize and emit the
   inlinee, and in the process of doing so we modify the block tree in such
   a way that we now have an exception_info variable inside the inlined
   M_refcopy function.  We we try to look for it inside the M_refcopy function
   we can't find it, and we end up aborting.

'b' seems pretty unlikely, as that would require that a DECL_CONTEXT field
get clobbered, and I don't think that -freorder-blocks can do that.  'a' seems
plausible though.

By the way, -freorder-blocks is known to have at least one other seriously
bad interaction with dwarf2out.c.  See 
	http://gcc.gnu.org/ml/gcc-bugs/2001-03/msg00434.html
This problem causes ia64-linux glibc build failures unless either -g or
-freorder-blocks is turned off.  This same problem has also been reported for
other linux systems, see the links at the bottom of the above message.

If the current problem is also a -freorder-blocks/dwarf2 interaction problem,
then perhaps -freorder-blocks shouldn't be on by default.

Jim

  reply	other threads:[~2001-04-14  2:01 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-11  6:56 Andreas Schwab
2001-04-11 12:47 ` Jim Wilson
2001-04-11 17:31   ` Mark Mitchell
2001-04-11 17:43   ` Mark Mitchell
2001-04-11 18:28     ` Daniel Berlin
2001-04-11 18:34       ` Mark Mitchell
2001-04-11 20:24         ` Daniel Berlin
2001-04-11 21:19           ` Mark Mitchell
2001-04-11 21:36             ` Daniel Berlin
2001-04-12 12:27               ` Bill Nottingham
2001-04-12 15:03                 ` Daniel Berlin
2001-04-12 21:07                   ` Bill Nottingham
2001-04-12 21:46                     ` Daniel Berlin
2001-04-12 13:04             ` Jim Wilson
2001-04-12 15:06               ` Daniel Berlin
2001-04-13  8:49           ` Andreas Schwab
2001-04-13 10:04             ` Daniel Berlin
2001-04-13 10:23               ` Andreas Schwab
2001-04-13 12:20                 ` Daniel Berlin
2001-04-13 12:39                   ` Andreas Schwab
2001-04-13 12:56                     ` Daniel Berlin
2001-04-13 13:06                       ` Andreas Schwab
2001-04-13 19:13     ` Jim Wilson
2001-04-13 19:59     ` Jim Wilson
2001-04-14  2:01       ` Jim Wilson [this message]
2001-04-14  4:08         ` Sam TH
2001-04-14  8:27           ` cvs (was: Bootstrap failure of gcc-ss-20010409 in ia64) Fergus Henderson
2001-04-14 11:28             ` Sam TH
2001-04-14 22:20             ` Jim Wilson
2001-04-14 23:48               ` Russ Allbery
2001-04-16 15:39         ` Bootstrap failure of gcc-ss-20010409 in ia64 Jim Wilson
2001-04-16 17:22           ` Mark Mitchell
2001-04-16 17:45             ` Jim Wilson
2001-04-17  8:22               ` Mark Mitchell
2001-04-17  8:57                 ` Daniel Berlin
2001-04-17 11:01                 ` Jim Wilson
2001-04-17 15:38                   ` Mark Mitchell
2001-04-17 16:16                     ` Daniel Berlin
2001-04-17 16:36                       ` Mark Mitchell
2001-04-18 14:35                       ` debugging optimized programs (Was: Re: Bootstrap failure of gcc-ss-20010409 in ia64) Joern Rennecke
2001-04-18 15:12                         ` Daniel Berlin
2001-04-18 15:49                           ` Joern Rennecke
2001-04-18 17:06                             ` Daniel Berlin
2001-04-18 17:18                               ` Daniel Berlin
2001-04-18 12:41                     ` Bootstrap failure of gcc-ss-20010409 in ia64 Jim Wilson
2001-04-18 13:49                       ` Mark Mitchell
2001-04-18 14:34                         ` Jim Wilson
2001-04-18 15:31                           ` Mark Mitchell
2001-04-17 18:12 Mike Stump
2001-04-17 19:01 ` Joe Buck
2001-04-17 20:38   ` Daniel Berlin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200104140901.CAA05718@wilson.cygnus.com \
    --to=wilson@cygnus.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=schwab@suse.de \
    --cc=wilson@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).