https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103756
Bug ID: 103756
Summary: [12 Regression] -fcompare-debug failure (length) with
-O -fconserve-stack -frename-registers -fno-tree-ch
-fira-algorithm=priority
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
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 52022
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52022&action=edit
auto-reduced testcase
Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fcompare-debug -fconserve-stack
-frename-registers -fno-tree-ch -fira-algorithm=priority testcase.C
x86_64-pc-linux-gnu-gcc: error: testcase.C: '-fcompare-debug' failure (length)
$ diff -u *gkd
--- a-testcase.C.gkd 2021-12-17 09:05:04.178074934 +0100
+++ a-testcase.gk.C.gkd 2021-12-17 09:05:04.238074933 +0100
@@ -75,6 +75,9 @@
]) "testcase.C":21:25# {*subdi_1}
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
+(insn # 0 0 2 (set (reg:DI 39 r11 [orig:91 _40 ] [91])
+ (reg/f:DI 5 di [orig:104 *__last_4(D).current ] [104]))
"testcase.C":21:25# {*movdi_internal}
+ (nil))
(insn # 0 0 2 (set (reg:QI 38 r10 [orig:89 __copy_move_b___trans_tmp_9.1_32 ]
[89])
(mem/c:QI (symbol_ref:DI ("__copy_move_b___trans_tmp_9") [flags 0x2]
<var_decl # __copy_move_b___trans_tmp_9>) [ __copy_move_b___trans_tmp_9+0 S1
A8])) "testcase.C":29:24# {*movqi_internal}
(nil))
@@ -84,7 +87,8 @@
(insn # 0 0 2 (set (reg:SI 4 si [105])
(plus:SI (reg:SI 36 r8 [orig:86 _13 ] [86])
(reg:SI 5 di [orig:91 _40 ] [91]))) "testcase.C":27:16# {*leasi}
- (nil))
+ (expr_list:REG_DEAD (reg:SI 5 di [orig:91 _40 ] [91])
+ (nil)))
(jump_insn # 0 0 2 (set (pc)
(label_ref #)) "testcase.C":27:5# {jump}
(nil)
@@ -131,12 +135,12 @@
-> 3)
(note # 0 0 [bb 5] NOTE_INSN_BASIC_BLOCK)
(insn # 0 0 5 (set (reg:DI 0 ax [orig:107 _40 ] [107])
- (zero_extend:DI (reg:SI 5 di [orig:91 _40 ] [91]))) "testcase.C":9:45#
{*zero_extendsidi2}
+ (zero_extend:DI (reg:SI 39 r11 [orig:91 _40 ] [91])))
"testcase.C":9:45# {*zero_extendsidi2}
(nil))
(insn # 0 0 5 (set (reg:CCGOC 17 flags)
- (compare:CCGOC (reg:SI 5 di [orig:91 _40 ] [91])
+ (compare:CCGOC (reg:SI 39 r11 [orig:91 _40 ] [91])
(const_int 0 [0]))) "testcase.C":9:45# {*cmpsi_ccno_1}
- (expr_list:REG_DEAD (reg:SI 5 di [orig:91 _40 ] [91])
+ (expr_list:REG_DEAD (reg:SI 39 r11 [orig:91 _40 ] [91])
(nil)))
(insn # 0 0 5 (set (reg:DI 2 cx [108])
(const_int 0 [0])) "testcase.C":9:45# {*movdi_internal}
$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-6031-20211217093444-g79a89108dd3-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r12-6031-20211217093444-g79a89108dd3-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20211217 (experimental) (GCC)