public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
@ 2020-03-26 10:16 zhroma at gcc dot gnu.org
  2020-03-26 10:31 ` [Bug debug/94340] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zhroma at gcc dot gnu.org @ 2020-03-26 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94340
           Summary: [9/10 Regression] -fcompare-debug -O failure on
                    cpp1z/nodiscard3.C
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhroma at gcc dot gnu.org
  Target Milestone: ---

This command:
gcc -c -fcompare-debug -O gcc/testsuite/g++.dg/cpp1z/nodiscard3.C

fails on master (r10-7374) and 9 branch on powerpc64le, works fine on current 8
branch.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
@ 2020-03-26 10:31 ` jakub at gcc dot gnu.org
  2020-03-26 10:39 ` [Bug debug/94340] [8/9/10 " jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-26 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-03-26
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |9.4
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r9-3352-g87bd153645f393a1fe18e4fcd7f4323f83a8ac87 (which means it
has been latent before).

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [8/9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
  2020-03-26 10:31 ` [Bug debug/94340] " jakub at gcc dot gnu.org
@ 2020-03-26 10:39 ` jakub at gcc dot gnu.org
  2020-04-01  7:47 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-26 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |8.5
                 CC|                            |aoliva at gcc dot gnu.org
            Summary|[9/10 Regression]           |[8/9/10 Regression]
                   |-fcompare-debug -O failure  |-fcompare-debug -O failure
                   |on cpp1z/nodiscard3.C       |on cpp1z/nodiscard3.C

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Though, with
--- nodiscard3.C.jj     2020-01-21 04:33:32.000000000 -0500
+++ nodiscard3.C        2020-03-26 06:35:24.000000000 -0400
@@ -195,7 +195,10 @@ test (void)
     return;
   if (check12 ().i)
     return;
-  if (({ check12 (); }).i)
+  if (
+      ({
+         check12 ();
+       }).i)
     return;
   check12 ();          /* { dg-warning "nodiscard" } */
   (void) check12 ();
change so that the different tokens are on different lines it started already
with the expected
r8-5241-g8697bf9f46f36168ddba5752db582e673e3cbe8c

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [8/9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
  2020-03-26 10:31 ` [Bug debug/94340] " jakub at gcc dot gnu.org
  2020-03-26 10:39 ` [Bug debug/94340] [8/9/10 " jakub at gcc dot gnu.org
@ 2020-04-01  7:47 ` rguenth at gcc dot gnu.org
  2021-05-14  9:53 ` [Bug debug/94340] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-01  7:47 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-01  7:47 ` rguenth at gcc dot gnu.org
@ 2021-05-14  9:53 ` jakub at gcc dot gnu.org
  2021-06-01  8:17 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-05-14  9:53 ` [Bug debug/94340] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-06-01  8:17 ` rguenth at gcc dot gnu.org
  2021-09-20  8:14 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [9/10/11/12 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-06-01  8:17 ` rguenth at gcc dot gnu.org
@ 2021-09-20  8:14 ` pinskia at gcc dot gnu.org
  2022-05-27  9:42 ` [Bug debug/94340] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-20  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
apinski@xeond:~/src/upstream-gcc$ diff -up nodiscard3.C.gkd nodiscard3.gk.C.gkd
--- nodiscard3.C.gkd    2021-09-20 07:45:03.448528331 +0000
+++ nodiscard3.gk.C.gkd 2021-09-20 07:45:04.373528230 +0000
@@ -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]
 <function_decl # check12>) [ 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 (<<cleanup_point (TARGET_EXPR <D.2655, <<cleanup_point TARGET_EXPR
<D.2654, <<< Unknown tree: aggr_init_expr
+      # DEBUG BEGIN STMT;
+      if (<<cleanup_point (TARGET_EXPR <D.2655, # DEBUG BEGIN STMT;
+      <<cleanup_point TARGET_EXPR <D.2654, <<< Unknown tree: aggr_init_expr
   3
   check12
-  D.2654 >>>>>>>).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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [10/11/12/13 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-09-20  8:14 ` pinskia at gcc dot gnu.org
@ 2022-05-27  9:42 ` rguenth at gcc dot gnu.org
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07 10:37 ` [Bug debug/94340] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [10/11/12/13 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-05-27  9:42 ` [Bug debug/94340] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:40 ` jakub at gcc dot gnu.org
  2023-07-07 10:37 ` [Bug debug/94340] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug debug/94340] [11/12/13/14 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C
  2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-06-28 10:40 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:37 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-07-07 10:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 10:16 [Bug debug/94340] New: [9/10 Regression] -fcompare-debug -O failure on cpp1z/nodiscard3.C zhroma at gcc dot gnu.org
2020-03-26 10:31 ` [Bug debug/94340] " jakub at gcc dot gnu.org
2020-03-26 10:39 ` [Bug debug/94340] [8/9/10 " jakub at gcc dot gnu.org
2020-04-01  7:47 ` rguenth at gcc dot gnu.org
2021-05-14  9:53 ` [Bug debug/94340] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01  8:17 ` rguenth at gcc dot gnu.org
2021-09-20  8:14 ` pinskia at gcc dot gnu.org
2022-05-27  9:42 ` [Bug debug/94340] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:40 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug debug/94340] [11/12/13/14 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).