From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10372 invoked by alias); 17 May 2011 09:56:57 -0000 Received: (qmail 10355 invoked by uid 22791); 17 May 2011 09:56:55 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,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; Tue, 17 May 2011 09:56:41 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/49000] [4.6/4.7 Regression] ICE: verify_ssa failed with -O2 -g 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: 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.1 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 Date: Tue, 17 May 2011 09: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: 2011-05/txt/msg01308.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49000 --- Comment #5 from Richard Guenther 2011-05-17 09:40:20 UTC --- (In reply to comment #4) > TREE_ADDRESSABLE is cleared by maybe_optimize_var during > execute_update_addresses_taken. If the debug stmt contains just the VAR_DECL, > it will be renamed, but in this case it is MEM_REF and for some reason isn't > renamed in that case (if I manually change it to the VAR_DECL, it is). > Later on fold_stmt_1 on the debug stmt performs maybe_fold_reference and > optimizes the MEM_REF into the VAR_DECL and triggers the checking failure. > If maybe_fold_reference is used already when the DEBUG stmt is created, it will > be just a VAR_DECL and thus it will work, but not sure if that is the way we > want to go. Hm, I thought we fold all debug stmts initially. Probably update-address-taken should handle debug-stmts in the if (update_vops) path similar to how it handles other mem-refs. But I suppose it would have to drop debug stmts in case it cannot rewrite them(?)