https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100541

            Bug ID: 100541
           Summary: [12 Regression] -fcompare-debug failure (length) with
                    -O3 -fno-expensive-optimizations -fno-tree-dce
                    -fno-tree-dominator-opts
           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
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Created attachment 50793
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50793&action=edit
auto-reduced testcase (from OpenTTD sources)

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O3 -fno-expensive-optimizations -fno-tree-dce
-fno-tree-dominator-opts -fcompare-debug testcase.C -save-temps
x86_64-pc-linux-gnu-gcc: error: testcase.C: '-fcompare-debug' failure (length)
$ diff -u *.gkd
--- a-testcase.C.gkd    2021-05-11 21:38:59.070437639 +0200
+++ a-testcase.gk.C.gkd 2021-05-11 21:38:59.103770789 +0200
@@ -93,7 +93,7 @@
                 (mult:SI (mem/c:SI (symbol_ref:DI ("y") [flags 0x2]  <var_decl
# y>) [ y+0 S4 A32])
                     (const_int -1431655765 [0xffffffffaaaaaaab])))
             (clobber (reg:CC 17 flags))
-        ])# {*mulsi3_1}
+        ]) "testcase.C":8:5# {*mulsi3_1}
      (expr_list:REG_UNUSED (reg:CC 17 flags)
         (nil)))
 (insn:TI # 0 0 7 (parallel [
@@ -101,7 +101,7 @@
                 (plus:SI (reg:SI 0 ax [113])
                     (const_int 715827882 [0x2aaaaaaa])))
             (clobber (reg:CC 17 flags))
-        ])# {*addsi_1}
+        ]) "testcase.C":8:5# {*addsi_1}
      (expr_list:REG_UNUSED (reg:CC 17 flags)
         (nil)))
 (insn:TI # 0 0 7 (set (reg:CC 17 flags)
@@ -163,7 +163,7 @@
                 (mult:SI (mem/c:SI (symbol_ref:DI ("y") [flags 0x2]  <var_decl
# y>) [ y+0 S4 A32])
                     (const_int -1431655765 [0xffffffffaaaaaaab])))
             (clobber (reg:CC 17 flags))
-        ])# {*mulsi3_1}
+        ]) "testcase.C":17:1# {*mulsi3_1}
      (expr_list:REG_UNUSED (reg:CC 17 flags)
         (nil)))
 (insn:TI # 0 0 10 (parallel [
@@ -171,7 +171,7 @@
                 (plus:SI (reg:SI 0 ax [100])
                     (const_int 715827882 [0x2aaaaaaa])))
             (clobber (reg:CC 17 flags))
-        ])# {*addsi_1}
+        ]) "testcase.C":17:1# {*addsi_1}
      (expr_list:REG_UNUSED (reg:CC 17 flags)
         (nil)))
 (insn:TI # 0 0 10 (set (reg:CC 17 flags)

$ 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-727-20210511185432-g3e3fdf3d521-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-727-20210511185432-g3e3fdf3d521-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210511 (experimental) (GCC)

Reply via email to