https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100774
Bug ID: 100774 Summary: [12 Regression] -fcompare-debug failure (length) with -O2 -fno-tree-forwprop --param=evrp-mode=ranger-trace Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz CC: aoliva at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Created attachment 50872 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50872&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-g++ -O2 -fno-tree-forwprop --param=evrp-mode=ranger-trace -fcompare-debug testcase.C x86_64-pc-linux-gnu-g++: error: testcase.C: '-fcompare-debug' failure (length) $ diff -u *gkd --- a-testcase.C.gkd 2021-05-26 17:07:09.776753885 +0200 +++ a-testcase.gk.C.gkd 2021-05-26 17:07:09.856753886 +0200 @@ -1,31 +1,15 @@ -Declarations used by foo, sorted by DECL_UID: -0: extern void error (void); ;; Function foo (_Z3foov, funcdef_no=1, cgraph_uid=2, symbol_order=2) (executed once) (note # 0 0 NOTE_INSN_DELETED) -(note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK) (note # 0 0 NOTE_INSN_FUNCTION_BEG) -(insn/f:TI # 0 0 2 (parallel [ - (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int -8 [0xfffffffffffffff8]))) - (clobber (reg:CC 17 flags)) - (clobber (mem:BLK (scratch) [ A8])) - ]) "testcase.C":12:1# {pro_epilogue_adjust_stack_add_di} - (expr_list:REG_UNUSED (reg:CC 17 flags) - (expr_list:REG_CFA_ADJUST_CFA (set (reg/f:DI 7 sp) - (plus:DI (reg/f:DI 7 sp) - (const_int -8 [0xfffffffffffffff8]))) - (nil)))) (note # 0 0 NOTE_INSN_PROLOGUE_END) -(call_insn:TI # 0 0 2 (call (mem:QI (symbol_ref:DI ("_Z5errorv") [flags 0x41] <function_decl # error>) [ error S1 A8]) - (const_int 0 [0])) "testcase.C":19:12# {*call} - (expr_list:REG_CALL_DECL (symbol_ref:DI ("_Z5errorv") [flags 0x41] <function_decl # error>) - (expr_list:REG_ARGS_SIZE (const_int 0 [0]) - (expr_list:REG_NORETURN (const_int 0 [0]) - (nil)))) - (nil)) +(code_label # 0 0 2 2 (nil) [1 uses]) +(note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK) +(jump_insn:TI # 0 0 2 (set (pc) + (label_ref #))# {jump} + (nil) + -> 2) (barrier # 0 0) (note # 0 0 NOTE_INSN_DELETED)