From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12662 invoked by alias); 19 Jul 2010 14:43:40 -0000 Received: (qmail 12602 invoked by uid 48); 19 Jul 2010 14:43:24 -0000 Date: Mon, 19 Jul 2010 14:43:00 -0000 Message-ID: <20100719144324.12601.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/44988] [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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: 2010-07/txt/msg01942.txt.bz2 ------- Comment #2 from rguenth at gcc dot gnu dot org 2010-07-19 14:43 ------- Ick. The problem is that with MEM_REF we now have local variables that are is_gimple_reg () but not in SSA form. void foo (void) { int i = 0; bar (*(struct S *) &i); } is undefined and thus we remove the initializer and expand from foo () { int i; # BLOCK 2 freq:10000 # PRED: ENTRY [100.0%] (fallthru,exec) bar (MEM[(struct S *)&i]); return; # SUCC: EXIT [100.0%] } where when processing the remaining local decls we stop processing 'i' at /* Expanded above already. */ if (is_gimple_reg (var)) { TREE_USED (var) = 0; goto next; } the issue is probably latent on the 4.5 branch if we manage to end up with bar (VIEW_CONVERT (i)); instead. We could rewrite i into SSA form but would have troubles with even more undefined code which would require a VIEW_CONVERT_EXPR to a different sized object (which we now reject during gimple validation - the view-converted use is the reason we don't rewrite it in the first place). Another long-standing idea was to extend the use of DECL_GIMPLE_REG_P to all variables (including those that are always registers). That enables a check for whether a variable is in SSA form. OTOH update-address-taken is to properly honor this and it does, it is just missing handling of call arguments. I have a patch. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Component|rtl-optimization |tree-optimization Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-07-19 14:43:24 date| | Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988