From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28052 invoked by alias); 6 Mar 2009 17:24:42 -0000 Received: (qmail 27997 invoked by uid 48); 6 Mar 2009 17:24:27 -0000 Date: Fri, 06 Mar 2009 17:24:00 -0000 Message-ID: <20090306172427.27996.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/39360] [4.4 Regression] ICE in referenced_var_lookup, at tree-dfa.c:563 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub 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 Mail-Followup-To: gcc-bugs@gcc.gnu.org X-SW-Source: 2009-03/txt/msg00448.txt.bz2 ------- Comment #8 from jakub at gcc dot gnu dot org 2009-03-06 17:24 ------- I think it is the new: 3384 if (TREE_STATIC (var) && !TREE_ASM_WRITTEN (var)) 3385 { 3386 if (var_ann (var) && referenced_var_check_and_insert (var)) 3387 cfun->local_decls = tree_cons (NULL_TREE, var, 3388 cfun->local_decls); 3389 } that causes this. Compared to add_referenced_var this doesn't do the: /* Scan DECL_INITIAL for pointer variables as they may contain address arithmetic referencing the address of other variables. Even non-constant initializers need to be walked, because IPA passes might prove that their are invariant later on. */ if (DECL_INITIAL (var) /* Initializers of external variables are not useful to the optimizers. */ && !DECL_EXTERNAL (var)) walk_tree (&DECL_INITIAL (var), find_vars_r, NULL, 0); part. So, either tree-inline.c needs to do the same, or it can't use referenced_vars bit as a test whether it has been queued already onto local_decls or not. Honza? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360