[Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C

2021-09-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94340

--- Comment #5 from Andrew Pinski  ---
apinski@xeond:~/src/upstream-gcc$ diff -up nodiscard3.C.gkd nodiscard3.gk.C.gkd
--- nodiscard3.C.gkd2021-09-20 07:45:03.448528331 +
+++ nodiscard3.gk.C.gkd 2021-09-20 07:45:04.373528230 +
@@ -2190,10 +2190,10 @@ Declarations used by test, sorted by DEC
 (note # 0 0 NOTE_INSN_DELETED)
 (insn # 0 0 166 (set (reg:DI 5 di [406])
 (plus:DI (reg/f:DI 7 sp)
-(const_int 7280 [0x1c70])))
"gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C":198:7# {*leadi}
+(const_int 7280 [0x1c70])))
"gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C":198:18# {*leadi}
  (nil))
 (call_insn # 0 0 166 (call (mem:QI (symbol_ref:DI ("_Z7check12v") [flags 0x41]
 ) [ check12 S1 A8])
-(const_int 0 [0]))
"gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C":198:7# {*call}
+(const_int 0 [0]))
"gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C":198:18# {*call}
  (expr_list:REG_DEAD (reg:DI 5 di)
 (expr_list:REG_EH_REGION (const_int 2 [0x2])
 (nil)))

Literally just column differences.



>From .gimple:
-  [gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C:198:7] D.2655 = check12
(); [return slot optimization]
+  [gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C:198:3] # DEBUG
BEGIN_STMT
+  [gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C:198:10] # DEBUG
BEGIN_STMT
+  [gcc/gcc/testsuite/g++.dg/cpp1z/nodiscard3.C:198:18] D.2655 =
check12 (); [return slot optimization]


The correct line/column is actually with debugging turned on 
column 7 is the start of the statement expression.

-  if (<>>).i != 0>>)
+  D.2654 >>;>).i != 0>>)


I wonder if this is a gimplification issue where the call gets the
TARGET_EXPR's location info if the TARGET_EXPR can be removed ...  Just happens
with the statement frontiers, that the TARGET_EXPR can no longer exactly be
removed so the location info is not copied.

[Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C

2021-06-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94340

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|9.4 |9.5

--- Comment #4 from Richard Biener  ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

[Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C

2021-05-14 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94340

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|8.5 |9.4

--- Comment #3 from Jakub Jelinek  ---
GCC 8 branch is being closed.