From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20111 invoked by alias); 19 Dec 2012 10:51:57 -0000 Received: (qmail 17022 invoked by uid 48); 19 Dec 2012 10:50:12 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/55736] lto ICE: tree code ''junl is not supported in LTO streams Date: Wed, 19 Dec 2012 10:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Keywords Status Last reconfirmed AssignedTo Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg01850.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55736 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |lto Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-12-19 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #2 from Richard Biener 2012-12-19 10:50:06 UTC --- Confirmed. We are writing #3 0x0000000000bd2802 in write_ts_exp_tree_pointers (ob=0x20b4000, expr=0x7ffff5d99ca0, ref_p=false) at /space/rguenther/src/svn/trunk/gcc/tree-streamer-out.c:747 747 stream_write_tree (ob, TREE_BLOCK (expr), ref_p); of an ADDR_EXPR: (gdb) call debug_tree (expr) BLK size unit size align 8 symtab 0 alias set -1 canonical type 0x7ffff69381f8 domain pointer_to_this > unsigned DI size unit size align 64 symtab 0 alias set -1 canonical type 0x7ffff69380a8> readonly constant arg 0 readonly constant static "\000">> but it seems to have been collected. The ADDR_EXPR is inside a CONSTRUCTOR which is created by switch-conversion: unsigned DI size unit size align 64 symtab 0 alias set -1 canonical type 0x7ffff69380a8> BLK size unit size align 64 symtab 0 alias set -1 canonical type 0x7ffff1112d20 domain DI size unit size align 64 symtab 0 alias set -1 canonical type 0x7ffff67f3738 precision 64 min max > pointer_to_this > readonly constant static BLK file output.cc line 1198 col 0 size unit size align 256 initial > DECL_INITIAL is written via 322 /* Write any LTO-specific data to OB. */ 323 if (DECL_P (expr) 324 && TREE_CODE (expr) != FUNCTION_DECL 325 && TREE_CODE (expr) != TRANSLATION_UNIT_DECL) 326 { 327 /* Handle DECL_INITIAL for symbols. */ 328 tree initial = DECL_INITIAL (expr); 329 if (TREE_CODE (expr) == VAR_DECL (gdb) l 330 && (TREE_STATIC (expr) || DECL_EXTERNAL (expr)) 331 && !DECL_IN_CONSTANT_POOL (expr) 332 && initial) 333 { 334 lto_symtab_encoder_t encoder; 335 struct varpool_node *vnode; 336 337 encoder = ob->decl_state->symtab_node_encoder; 338 vnode = varpool_get_node (expr); 339 if (!vnode ... so we seem to have an issue with BLOCKs being referenced from DECL_INITIALs of decls we put into varpool. The case in question (switch-conversion) may be the only way this happens, but who knows what frontends do here? Btw, switch-conversion forgets to unshare the exprs as well.