public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/51573] [4.7 Regression] ICE (segfault) in lto_varpool_encoder_encode_initializer_p
Date: Fri, 16 Dec 2011 13:12:00 -0000	[thread overview]
Message-ID: <bug-51573-4-X7prNHyVOf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51573-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51573

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-16 12:50:05 UTC ---
(In reply to comment #6)
> It's a really messed up situation as with the C++ units
> 
> void
> bar1 (void)
> {
>   extern void foo (int);
>   foo (0);
> }
> 
> ---
> 
> void
> bar2 (void)
> {
>   extern void foo (int);
>   foo (0);
> }
> 
> ---
> 
> void foo (int) {}
> 
> we _do_ need to enter the function local foo's for decl/cgraph merging.
> But OTOH we cannot, as the merged decl can only appear in one BLOCK_VARS
> list.  ISTM that either the frontends should move those over to
> BLOCK_NONLOCALIZED_DECLS or all frontends consistently need to put a
> decl copy in BLOCK_VARS for the sake of debuginfo (still using the
> global-scope decl for the actual call) - that is what the C frontend
> is doing and that works quite well.
> 
> Jason?  Can we please change the C++ frontend to mimic what the C
> frontend does here?  See c-decl.c:1199ff.
> 
> I'm testing another (temporary?) workaround, still prone to the above
> issue.

And it exactly shows the issue during LTO bootstrap with

`is_cpp_driver' referenced in section `.text' of
/tmp/ccNdxpcJ.ltrans15.ltrans.o: defined in discarded section `.text' of gcc.o
(symbol from plugin)
collect2: error: ld returned 1 exit status
make[3]: *** [cpp] Error 1

:(


  parent reply	other threads:[~2011-12-16 12:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 18:09 [Bug lto/51573] New: " markus at trippelsdorf dot de
2011-12-15 18:57 ` [Bug lto/51573] " markus at trippelsdorf dot de
2011-12-16  8:36 ` rguenth at gcc dot gnu.org
2011-12-16  9:41 ` rguenth at gcc dot gnu.org
2011-12-16 10:24 ` rguenth at gcc dot gnu.org
2011-12-16 10:49 ` rguenth at gcc dot gnu.org
2011-12-16 12:17 ` rguenth at gcc dot gnu.org
2011-12-16 13:12 ` rguenth at gcc dot gnu.org [this message]
2011-12-16 13:23 ` rguenth at gcc dot gnu.org
2011-12-16 13:36 ` rguenth at gcc dot gnu.org
2011-12-16 15:45 ` rguenth at gcc dot gnu.org
2011-12-19 16:01 ` rguenth at gcc dot gnu.org
2011-12-19 16:01 ` rguenth at gcc dot gnu.org

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=bug-51573-4-X7prNHyVOf@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).