public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/48492] New: [4.7 Regression] LTO bootstrap failure in copy_constant
@ 2011-04-07 13:00 jakub at gcc dot gnu.org
  2011-04-07 13:15 ` [Bug bootstrap/48492] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-07 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.7 Regression] LTO bootstrap failure in
                    copy_constant
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


Created attachment 23910
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23910
broken patch

../configure --enable-languages=all,obj-c++,ada,lto,go
--enable-checking=yes,rtl --with-build-config=bootstrap-lto
make -j64
fails with:
../../gcc/ada/ali.ads:39:1: internal compiler error: in copy_constant, at
varasm.c:3030
while linking gnatbind with -flto.
The problem is related to streaming out and in DECL_IN_CONSTANT_POOL var decls,
I guess in the original compilation it is streamed out normally, but when
it is streamed in, tree_output_constant_def isn't called on the DECL_INITIAL,
so it isn't registered with varpool and thus when streaming it out again,
varpool_get_node returns NULL and we stream the decl with DECL_IN_CONSTANT_POOL
set, but DECL_INITIAL being error_mark_node.  When it is streamed in again,
and expand_debug_expr calls mark_decl_rtl on it, it ICEs, because
error_mark_node isn't a constant.

I believe we need to stream DECL_IN_CONSTANT_POOL vars specially, basically
stream just the constants from its DECL_INITIAL and have the stream reader
call tree_output_constant_def for it.  Tried to do this in attached patch, but
probably it needs to be done slightly elsewhere, perhaps after after caching it
or whatever.  Not too familiar with the streamer...


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-06-27 16:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 13:00 [Bug bootstrap/48492] New: [4.7 Regression] LTO bootstrap failure in copy_constant jakub at gcc dot gnu.org
2011-04-07 13:15 ` [Bug bootstrap/48492] " rguenth at gcc dot gnu.org
2011-04-10 15:59 ` ebotcazou at gcc dot gnu.org
2011-04-11 10:52 ` [Bug lto/48492] " ebotcazou at gcc dot gnu.org
2011-04-15 22:52 ` ebotcazou at gcc dot gnu.org
2011-04-16  7:59 ` jakub at gcc dot gnu.org
2011-04-16  8:51 ` ebotcazou at gcc dot gnu.org
2011-04-18 10:18 ` ebotcazou at gcc dot gnu.org
2011-04-20 11:21 ` ebotcazou at gcc dot gnu.org
2011-04-21 12:58 ` jakub at gcc dot gnu.org
2011-04-21 13:19 ` ebotcazou at gcc dot gnu.org
2011-06-27 16:42 ` ebotcazou at gcc dot gnu.org
2011-06-27 16:47 ` ebotcazou at gcc dot gnu.org

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).