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

            Bug ID: 105653
           Summary: [10/11/12/13 Regression] '-fcompare-debug' failure w/
                    -O2
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: compare-debug-failure
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

Created attachment 52992
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52992&action=edit
Testcase

g++ 13.0.0 20220515 snapshot (g:18547874ee205d830acb31f1e3c1c89fc7725c14) fails
-fcompare-debug check when compiling the attached testcase w/ -O2:

% aarch64-linux-gnu-g++-13.0.0 -O2 -fcompare-debug -c q9dyty2d.cpp
aarch64-linux-gnu-g++-13.0.0: error: q9dyty2d.cpp: '-fcompare-debug' failure
(length)

gkd diff:

--- q9dyty2d.cpp.gkd    2022-05-19 13:16:40.109118502 +0700
+++ q9dyty2d.gk.cpp.gkd 2022-05-19 13:16:40.167118178 +0700
@@ -729,9 +729,7 @@
 (insn:TI # 0 0 (set (reg/f:DI 3 x3 [orig:113 MEM[(struct btVector3 * *)_31 +
8B] ] [113])
         (mem/f:DI (plus:DI (reg:DI 2 x2 [orig:101 D.xxxx ] [101])
                 (const_int 8 [0x8])) [ MEM[(struct btVector3 * *)_31 + 8B]+0
S8 A64])) "q9dyty2d.cpp":39:17# {*movdi_aarch64}
-     (expr_list:REG_EQUIV (mem/f:DI (plus:DI (reg:DI 2 x2 [orig:101 D.xxxx ]
[101])
-                (const_int 8 [0x8])) [ MEM[(struct btVector3 * *)_31 + 8B]+0
S8 A64])
-        (nil)))
+     (nil))
 (jump_insn:TI # 0 0 (set (pc)
         (if_then_else (ne (reg/f:DI 3 x3 [orig:113 MEM[(struct btVector3 *
*)_31 + 8B] ] [113])
                 (const_int 0 [0]))
@@ -899,9 +897,7 @@
 (insn:TI # 0 0 (set (reg/f:DI 3 x3 [orig:112 MEM[(struct btVector3 * *)_30 +
8B] ] [112])
         (mem/f:DI (plus:DI (reg:DI 2 x2 [orig:101 D.xxxx ] [101])
                 (const_int 8 [0x8])) [ MEM[(struct btVector3 * *)_30 + 8B]+0
S8 A64])) "q9dyty2d.cpp":39:17# {*movdi_aarch64}
-     (expr_list:REG_EQUIV (mem/f:DI (plus:DI (reg:DI 2 x2 [orig:101 D.xxxx ]
[101])
-                (const_int 8 [0x8])) [ MEM[(struct btVector3 * *)_30 + 8B]+0
S8 A64])
-        (nil)))
+     (nil))
 (jump_insn:TI # 0 0 (set (pc)
         (if_then_else (ne (reg/f:DI 3 x3 [orig:112 MEM[(struct btVector3 *
*)_30 + 8B] ] [112])
                 (const_int 0 [0]))

Reply via email to