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/54898] [4.8 regression] ICE in uniquify_nodes, at lto/lto.c:1898
Date: Thu, 11 Oct 2012 15:00:00 -0000	[thread overview]
Message-ID: <bug-54898-4-HrOee17kIB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54898-4@http.gcc.gnu.org/bugzilla/>


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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-11 15:00:09 UTC ---
What happens is that the input at LTRANS stage has wrecked TYPE_MAIN_VARIANT:

(gdb) call debug_tree ($31)
 <integer_type 0x7ffff692a348 wchar_t readonly SI
    size <integer_cst 0x7ffff67f40a0 type <integer_type 0x7ffff67f00a8
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff67f40c0 type <integer_type 0x7ffff67f0000
sizetype> constant 4>
    align 32 symtab 0 alias set -1 structural equality precision 32 min
<integer_cst 0x7ffff6912880 -2147483648> max <integer_cst 0x7ffff6912a40
2147483647>>
(gdb) p $31->type_common.main_variant 
$32 = (tree) 0x7ffff6924540
(gdb) call debug_tree ($32)
 <integer_type 0x7ffff6924540 wchar_t SI
    size <integer_cst 0x7ffff67f40a0 type <integer_type 0x7ffff67f00a8
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff67f40c0 type <integer_type 0x7ffff67f0000
sizetype> constant 4>
    align 32 symtab 0 alias set -1 structural equality precision 32 min
<integer_cst 0x7ffff67f4040 -2147483648> max <integer_cst 0x7ffff67f4060
2147483647> context <translation_unit_decl 0x7ffff6927170 D.2440>>
(gdb) p $31->type_common.main_variant->type_common.main_variant 
$33 = (tree) 0x7ffff67f05e8
(gdb) call debug_tree ($33)
 <integer_type 0x7ffff67f05e8 int public SI
    size <integer_cst 0x7ffff67f40a0 type <integer_type 0x7ffff67f00a8
bitsizetype> constant 32>
    unit size <integer_cst 0x7ffff67f40c0 type <integer_type 0x7ffff67f0000
sizetype> constant 4>
    align 32 symtab 0 alias set -1 canonical type 0x7ffff67f05e8 precision 32
min <integer_cst 0x7ffff67f4040 -2147483648> max <integer_cst 0x7ffff67f4060
2147483647>
    pointer_to_this <pointer_type 0x7ffff67f82a0>>

thus a TYPE_MAIN_VARIANT of a main variant is not itself.  The code
cannot deal with this impossible situation.  Thus,
TYPE_MAIN_VARIANT (t) == TYPE_MAIN_VARIANT (TYPE_MAIN_VARIANT (t))
needs to always hold.

It might be that things break here because $33 is integer_type_node, a
type we pre-load into the streamer cache.

More investigation needed.


  parent reply	other threads:[~2012-10-11 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-11 10:10 [Bug lto/54898] New: " dimhen at gmail dot com
2012-10-11 10:11 ` [Bug lto/54898] " dimhen at gmail dot com
2012-10-11 14:00 ` rguenth at gcc dot gnu.org
2012-10-11 15:00 ` rguenth at gcc dot gnu.org [this message]
2012-10-11 15:16 ` rguenth at gcc dot gnu.org
2012-10-11 16:46 ` markus at trippelsdorf dot de
2012-10-12 10:16 ` rguenth at gcc dot gnu.org
2012-10-12 12:14 ` rguenth at gcc dot gnu.org
2012-10-12 12:29 ` 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-54898-4-HrOee17kIB@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).