From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7920 invoked by alias); 22 May 2012 14:39:36 -0000 Received: (qmail 7798 invoked by uid 22791); 22 May 2012 14:39:35 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 May 2012 14:39:16 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/53426] [4.8 Regression] ICE:create_variable_info_for at ../../gcc-trunk/gcc/tree-ssa-structalias.c:5581 Date: Tue, 22 May 2012 14:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization 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: 4.8.0 X-Bugzilla-Changed-Fields: 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-05/txt/msg02204.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53426 --- Comment #10 from Richard Guenther 2012-05-22 13:52:49 UTC --- (In reply to comment #9) > OK, > I see the following: > 6882 FOR_EACH_VARIABLE (var) > 6883 { > 6884 if (var->alias) > 6885 continue; > 6886 > 6887 get_vi_for_tree (var->symbol.decl); > 6888 } > > (gdb) p dump_varpool_node (stderr, var) > _ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE.local.230/1658 > (_ZTVN5boost16exception_detail19error_info_injectorISt13runtime_errorEE) > @0x7ffff75f1e88 > Type: variable > Visibility: in_other_partition used_from_other_partition > prevailing_def_ironly external public visibility_specified visibility:hidden > virtual artificial > References: > Referring: > _ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414 > (addr)_ZNK5boost16exception_detail10clone_implINS0_19error_info_injectorISt13runtime_errorEEE5cloneEv.local.151/2414 > (addr) > Availability: overwritable > Varpool flags: initialized finalized > > this var won't pass varpool_all_refs_explicit: it is from other partition and > used from elsewhere. > > Partitioning should have put the variables referred by this constructor into a > boundary and it is not doing it - I will fix that. > (it gets that right at my internal symbol table tree) > > On the other hand, is ipa-pta able to take advantage of fact that the variable > is readonly? I would propose: > Index: tree-ssa-structalias.c > =================================================================== > --- tree-ssa-structalias.c (revision 187695) > +++ tree-ssa-structalias.c (working copy) > @@ -5583,7 +5583,8 @@ create_variable_info_for (tree decl, con > > /* If this is a global variable with an initializer and we are in > IPA mode generate constraints for it. */ > - if (DECL_INITIAL (decl)) > + if (DECL_INITIAL (decl) > + && vnode->analyzed) > { > VEC (ce_s, heap) *rhsc = NULL; > struct constraint_expr lhs, *rhsp; > > I.e. to care only about constructors of vars from current partition. > This function does not check varpool_all_refs_explicit as you suggested in > previous comment. Ok, this fixes it. You explained DECL_INITIAL of a !vnode->analyzed can never refer to a varpool_all_refs_explicit_p () decl.