------- Comment #2 from jakub at gcc dot gnu dot org 2010-01-11 10:31 ------- The problem here are different holes in SSA_NAMEs - with -fvar-tracking-assignments most of the SSA_NAME_VERSION values are one larger than without it. -fcompare-debug dumps include these versions in some MEMs, so it triggers the failure, on this testcase no actual code difference is present though. The difference shows up during early inlining, #0 make_ssa_name_fn (fn=0x7ffff1e8a6c0, var=0x7ffff1e9ebe0, stmt=0x0) at ../../gcc/tree-ssanames.c:126 #1 0x0000000000e97142 in make_ssa_name (var=0x7ffff1e9ebe0, stmt=0x0) at ../../gcc/tree-flow-inline.h:1247 #2 0x0000000000e9741d in remap_ssa_name (name=0x7ffff1de2898, id=0x7fffffffde90) at ../../gcc/tree-inline.c:202 #3 0x0000000000e9a9b7 in remap_gimple_op_r (tp=0x7ffff1ddf238, walk_subtrees=0x7fffffffd6b0, data=0x7fffffffda50) at ../../gcc/tree-inline.c:738 #4 0x0000000000dc3988 in walk_tree_1 (tp=0x7ffff1ddf238, func=0xe9a936 <remap_gimple_op_r>, data=0x7fffffffda50, pset=0x0, lh=0) at ../../gcc/tree.c:9978 #5 0x0000000000ea13bb in copy_debug_stmt (stmt=0x7ffff1ddf200, id=0x7fffffffde90) at ../../gcc/tree-inline.c:2163 #6 0x0000000000ea1441 in copy_debug_stmts (id=0x7fffffffde90) at ../../gcc/tree-inline.c:2192 creates a SSA_NAME which of course -g0 doesn't create. The debug stmt is even reset immediately afterwards.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42645