From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6491 invoked by alias); 25 Mar 2010 16:49:49 -0000 Received: (qmail 6397 invoked by uid 48); 25 Mar 2010 16:49:31 -0000 Date: Thu, 25 Mar 2010 16:49:00 -0000 Message-ID: <20100325164931.6396.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/43516] "-fcompare-debug failure" at -O2 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 X-SW-Source: 2010-03/txt/msg02564.txt.bz2 ------- Comment #4 from jakub at gcc dot gnu dot org 2010-03-25 16:49 ------- Seems remove_unused_scope_block_p removes from BLOCK #0 SUPERCONTEXT: re_string_skip_chars VARS: prev_st rawbuf_idx mbclen wc the prev_st variable which was unused. But remove_unused_scope_block_p does this only for -g0/-g1. Then during inlining, expand_call_inline -> remap_blocks -> remap_block -> remap_decls -> remap_decl -> copy_decl_maybe_to_var -> copy_decl_no_change -> copy_node_stat copies these decls, and obviously if there are more in -g2 case from -g0 case, DECL_UIDs get out of sync and thus the -fcompare-debug failure. There isn't actually any code change on the #c1 testcase, at least not on x86_64-linux, but with the DECL_UIDs being out of sync there is the possibility that some algorithm hashing by DECL_UIDs and then traversing the hash table would lead to code differences. Or have we changed all such places to use bitmaps? -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|wrong-code | Summary|[4.5 Regression] "-fcompare-|"-fcompare-debug failure" at |debug failure" at -O2 |-O2 Target Milestone|4.5.0 |--- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43516