public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
@ 2021-06-01 10:42 zsojka at seznam dot cz
  2021-06-02  7:50 ` [Bug debug/100852] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2021-06-01 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100852
           Summary: [11/12 Regression] -fcompare-debug failure (length)
                    with -Og -fif-conversion -fno-tree-ccp
                    -fno-tree-copy-prop
           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 50902
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50902&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
-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-06-01 12:41:23.194487854 +0200
+++ a-testcase.gk.C.gkd 2021-06-01 12:41:23.294487994 +0200
@@ -25,10 +25,11 @@
 (note # 0 0 NOTE_INSN_DELETED)
 (note # 0 0 NOTE_INSN_DELETED)
 (note # 0 0 NOTE_INSN_DELETED)
+(note # 0 0 NOTE_INSN_DELETED)
 (insn # 0 0 2 (set (reg:SI 4 si)
         (const_int 0 [0])) "testcase.C":17:10# {*movsi_internal}
      (nil))
-(insn # 0 0 2 (set (reg:DI 5 di [92])
+(insn # 0 0 2 (set (reg:DI 5 di [93])
         (plus:DI (reg/f:DI 7 sp)
             (const_int 15 [0xf]))) "testcase.C":17:10# {*leadi}
      (nil))

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r12-1138-20210601095814-g28daadc9809-checking-yes-rtl-df-extra-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
--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-1138-20210601095814-g28daadc9809-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210601 (experimental) (GCC)

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

* [Bug debug/100852] [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
@ 2021-06-02  7:50 ` rguenth at gcc dot gnu.org
  2021-06-08 11:48 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-02  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.2

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So actual code seems to be the same

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

* [Bug debug/100852] [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
  2021-06-02  7:50 ` [Bug debug/100852] " rguenth at gcc dot gnu.org
@ 2021-06-08 11:48 ` jakub at gcc dot gnu.org
  2021-06-08 13:47 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-08 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-2588-gc072fd236dc08f990bfcffd98b27f211a39bb404

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

* [Bug debug/100852] [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
  2021-06-02  7:50 ` [Bug debug/100852] " rguenth at gcc dot gnu.org
  2021-06-08 11:48 ` jakub at gcc dot gnu.org
@ 2021-06-08 13:47 ` jakub at gcc dot gnu.org
  2021-06-10  7:30 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-08 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-06-08
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 50963
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50963&action=edit
gcc12-pr100852.patch

Untested fix.

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

* [Bug debug/100852] [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2021-06-08 13:47 ` jakub at gcc dot gnu.org
@ 2021-06-10  7:30 ` cvs-commit at gcc dot gnu.org
  2021-06-14  9:44 ` [Bug debug/100852] [11 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-10  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:2d2ed777b23ab6503027039e0adbfe1162f52b2f

commit r12-1354-g2d2ed777b23ab6503027039e0adbfe1162f52b2f
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Jun 10 09:28:27 2021 +0200

    ifcvt: Fix -fcompare-debug bug [PR100852]

    The following testcase fails -fcompare-debug, because it is ifcvt optimized
    into umin only with -g0 and not with -g - the function(s) use
    prev_nonnote_insn, which without -g finds a real insn the code is looking
    for, while with -g finds a DEBUG_INSN.

    2021-06-10  Jakub Jelinek  <jakub@redhat.com>

            PR debug/100852
            * ifcvt.c (noce_get_alt_condition, noce_try_abs): Use
            prev_nonnote_nondebug_insn instead of prev_nonnote_insn.

            * g++.dg/opt/pr100852.C: New test.

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

* [Bug debug/100852] [11 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2021-06-10  7:30 ` cvs-commit at gcc dot gnu.org
@ 2021-06-14  9:44 ` jakub at gcc dot gnu.org
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-14  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12 Regression]          |[11 Regression]
                   |-fcompare-debug failure     |-fcompare-debug failure
                   |(length) with -Og           |(length) with -Og
                   |-fif-conversion             |-fif-conversion
                   |-fno-tree-ccp               |-fno-tree-ccp
                   |-fno-tree-copy-prop         |-fno-tree-copy-prop

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.

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

* [Bug debug/100852] [11 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2021-06-14  9:44 ` [Bug debug/100852] [11 " jakub at gcc dot gnu.org
@ 2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
  2021-06-17  7:59 ` jakub at gcc dot gnu.org
  2021-11-15 13:51 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-17  5:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:ed8181b187f9edf8711103b2ddfd95d368f2641a

commit r11-8592-ged8181b187f9edf8711103b2ddfd95d368f2641a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Jun 10 09:28:27 2021 +0200

    ifcvt: Fix -fcompare-debug bug [PR100852]

    The following testcase fails -fcompare-debug, because it is ifcvt optimized
    into umin only with -g0 and not with -g - the function(s) use
    prev_nonnote_insn, which without -g finds a real insn the code is looking
    for, while with -g finds a DEBUG_INSN.

    2021-06-10  Jakub Jelinek  <jakub@redhat.com>

            PR debug/100852
            * ifcvt.c (noce_get_alt_condition, noce_try_abs): Use
            prev_nonnote_nondebug_insn instead of prev_nonnote_insn.

            * g++.dg/opt/pr100852.C: New test.

    (cherry picked from commit 2d2ed777b23ab6503027039e0adbfe1162f52b2f)

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

* [Bug debug/100852] [11 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
@ 2021-06-17  7:59 ` jakub at gcc dot gnu.org
  2021-11-15 13:51 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-06-17  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

* [Bug debug/100852] [11 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop
  2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2021-06-17  7:59 ` jakub at gcc dot gnu.org
@ 2021-11-15 13:51 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-15 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*** Bug 100469 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-11-15 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 10:42 [Bug debug/100852] New: [11/12 Regression] -fcompare-debug failure (length) with -Og -fif-conversion -fno-tree-ccp -fno-tree-copy-prop zsojka at seznam dot cz
2021-06-02  7:50 ` [Bug debug/100852] " rguenth at gcc dot gnu.org
2021-06-08 11:48 ` jakub at gcc dot gnu.org
2021-06-08 13:47 ` jakub at gcc dot gnu.org
2021-06-10  7:30 ` cvs-commit at gcc dot gnu.org
2021-06-14  9:44 ` [Bug debug/100852] [11 " jakub at gcc dot gnu.org
2021-06-17  5:59 ` cvs-commit at gcc dot gnu.org
2021-06-17  7:59 ` jakub at gcc dot gnu.org
2021-11-15 13:51 ` jakub 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).