[Bug debug/43516] "-fcompare-debug failure" at -O2
jakub at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 25 16:49:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list