From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15452 invoked by alias); 10 Dec 2010 15:58:46 -0000 Received: (qmail 15441 invoked by uid 22791); 10 Dec 2010 15:58:45 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GD,TW_TM 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; Fri, 10 Dec 2010 15:58:41 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/46879] [4.6 Regression] ICE: in separate_decls_in_region_debug_bind, at tree-parloops.c:778 with -flto -ftree-parallelize-loops -gdwarf-3 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: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed 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 Date: Fri, 10 Dec 2010 15:58:00 -0000 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-12/txt/msg01129.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46879 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.10 15:58:39 Ever Confirmed|0 |1 --- Comment #4 from Richard Guenther 2010-12-10 15:58:39 UTC --- (In reply to comment #3) > (In reply to comment #2) > > Hm, well. Then the debug machinery has to deal with type mismatches I guess. > > Well, all the debug machinery cares is that the var has the original, declared > type. > > > But I wonder why we have debug-stmts for global variables anyway? I thought > > they are only used for registers. > > It is not a global variable, it is a VAR_DECL with DECL_ABSTRACT_ORIGIN > PARM_DECL in bar, i.e. optimized away parameter/automatic variable. It is a > non-localized var in main, because it is never referenced there, except for > GIMPLE_DEBUG. Ah, ok. The fix is then to amend the 1768 if (TREE_CODE (*basep) == VAR_DECL 1769 && !auto_var_in_fn_p (*basep, current_function_decl)) check properly. The easiest check would be && !is_gimple_debug, or a auto_var_in_fn_p variant without a specific function, thus auto_var_p.