public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
@ 2021-04-25 19:21 zsojka at seznam dot cz
  2021-04-26  7:30 ` [Bug debug/100254] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2021-04-25 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100254
           Summary: [11/12 Regression] -fcompare-debug failure (length)
                    with -O2 -fno-guess-branch-probability -fipa-pta
                    -fnon-call-exceptions
           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 50673
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50673&action=edit
auto-reduced testcase (from OpenTTD sources)

Compiler output:
$ x86_64-pc-linux-gnu-g++ -O2 -mtune=goldmont -fno-guess-branch-probability
-fipa-pta -fnon-call-exceptions -fcompare-debug testcase.C 
testcase.C:20:38: warning: friend declaration 'bool
operator!=(_Rb_tree_const_iterator<_Tp>::_Self,
_Rb_tree_const_iterator<_Tp>::_Self)' declares a non-template function
[-Wnon-template-friend]
   20 |   friend bool operator!=(_Self, _Self);
      |                                      ^
testcase.C:20:38: note: (if this is not what you intended, make sure the
function template has already been declared and add '<>' after the function
name here)
testcase.C: In member function 'bool CargoSorter::operator()(const
CargoDataEntry*, const CargoDataEntry*) const':
testcase.C:82:61: warning: no return statement in function returning non-void
[-Wreturn-type]
   82 |                              const CargoDataEntry *) const {}
      |                                                             ^
x86_64-pc-linux-gnu-g++: error: testcase.C: '-fcompare-debug' failure (length)

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

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

* [Bug debug/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
@ 2021-04-26  7:30 ` rguenth at gcc dot gnu.org
  2021-04-26  8:28 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-26  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug debug/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
  2021-04-26  7:30 ` [Bug debug/100254] " rguenth at gcc dot gnu.org
@ 2021-04-26  8:28 ` jakub at gcc dot gnu.org
  2021-04-26  9:41 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-26  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-04-26
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-5391-gbb07490abba850fd5b1d2d09d76d18b8bdc7d817

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

* [Bug debug/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
  2021-04-26  7:30 ` [Bug debug/100254] " rguenth at gcc dot gnu.org
  2021-04-26  8:28 ` jakub at gcc dot gnu.org
@ 2021-04-26  9:41 ` jakub at gcc dot gnu.org
  2021-04-26 10:42 ` [Bug rtl-optimization/100254] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-26  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is during Cross-jumping in jump2 pass, so the r11-5391
change just likely triggered a latent problem.  Will have a look in detail
soon.

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2021-04-26  9:41 ` jakub at gcc dot gnu.org
@ 2021-04-26 10:42 ` jakub at gcc dot gnu.org
  2021-04-27 13:27 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-26 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

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

Untested fix.

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2021-04-26 10:42 ` [Bug rtl-optimization/100254] " jakub at gcc dot gnu.org
@ 2021-04-27 13:27 ` cvs-commit at gcc dot gnu.org
  2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:e600df51a15b2ec7a72731921a2464ffe59cf5ab

commit r12-157-ge600df51a15b2ec7a72731921a2464ffe59cf5ab
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:26:24 2021 +0200

    cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

    The following testcase fails with -fcompare-debug.  The problem is that
    outgoing_edges_match behaves differently between -g0 and -g, if
    some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the
    REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is
    done.

    We already compute last1 and last2 as BB_END (bb{1,2}) with skipped debug
    insns and notes, so this patch just uses those.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100254
            * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
            last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2)
insns.

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

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2021-04-27 13:27 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
  2021-04-27 13:34 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 13:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:7f8eea0b16494554d623113c8138879b3f31d67a

commit r11-8299-g7f8eea0b16494554d623113c8138879b3f31d67a
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:26:24 2021 +0200

    cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

    The following testcase fails with -fcompare-debug.  The problem is that
    outgoing_edges_match behaves differently between -g0 and -g, if
    some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the
    REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is
    done.

    We already compute last1 and last2 as BB_END (bb{1,2}) with skipped debug
    insns and notes, so this patch just uses those.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100254
            * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
            last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2)
insns.

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

    (cherry picked from commit e600df51a15b2ec7a72731921a2464ffe59cf5ab)

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 13:34 ` jakub at gcc dot gnu.org
  2021-05-04 12:08 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2021-04-27 13:34 ` jakub at gcc dot gnu.org
@ 2021-05-04 12:08 ` cvs-commit at gcc dot gnu.org
  2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
  2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-04 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:5a79a9043c2c8e07ab3165437a93d54cbbc9890d

commit r10-9793-g5a79a9043c2c8e07ab3165437a93d54cbbc9890d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:26:24 2021 +0200

    cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

    The following testcase fails with -fcompare-debug.  The problem is that
    outgoing_edges_match behaves differently between -g0 and -g, if
    some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the
    REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is
    done.

    We already compute last1 and last2 as BB_END (bb{1,2}) with skipped debug
    insns and notes, so this patch just uses those.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100254
            * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
            last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2)
insns.

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

    (cherry picked from commit e600df51a15b2ec7a72731921a2464ffe59cf5ab)

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2021-05-04 12:08 ` cvs-commit at gcc dot gnu.org
@ 2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
  2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-04 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:1eb90acf00a47f9ed28ff6bd7914a4ae4bf9d325

commit r9-9505-g1eb90acf00a47f9ed28ff6bd7914a4ae4bf9d325
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:26:24 2021 +0200

    cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

    The following testcase fails with -fcompare-debug.  The problem is that
    outgoing_edges_match behaves differently between -g0 and -g, if
    some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the
    REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is
    done.

    We already compute last1 and last2 as BB_END (bb{1,2}) with skipped debug
    insns and notes, so this patch just uses those.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100254
            * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
            last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2)
insns.

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

    (cherry picked from commit e600df51a15b2ec7a72731921a2464ffe59cf5ab)

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

* [Bug rtl-optimization/100254] [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions
  2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
@ 2021-05-04 12:26 ` cvs-commit at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-04 12:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r8-10946-ge5b0236ad76d4acecb3503b9623bf64f6c3605d3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 27 15:26:24 2021 +0200

    cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

    The following testcase fails with -fcompare-debug.  The problem is that
    outgoing_edges_match behaves differently between -g0 and -g, if
    some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the
    REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is
    done.

    We already compute last1 and last2 as BB_END (bb{1,2}) with skipped debug
    insns and notes, so this patch just uses those.

    2021-04-27  Jakub Jelinek  <jakub@redhat.com>

            PR rtl-optimization/100254
            * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on
            last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2)
insns.

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

    (cherry picked from commit e600df51a15b2ec7a72731921a2464ffe59cf5ab)

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

end of thread, other threads:[~2021-05-04 12:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25 19:21 [Bug debug/100254] New: [11/12 Regression] -fcompare-debug failure (length) with -O2 -fno-guess-branch-probability -fipa-pta -fnon-call-exceptions zsojka at seznam dot cz
2021-04-26  7:30 ` [Bug debug/100254] " rguenth at gcc dot gnu.org
2021-04-26  8:28 ` jakub at gcc dot gnu.org
2021-04-26  9:41 ` jakub at gcc dot gnu.org
2021-04-26 10:42 ` [Bug rtl-optimization/100254] " jakub at gcc dot gnu.org
2021-04-27 13:27 ` cvs-commit at gcc dot gnu.org
2021-04-27 13:32 ` cvs-commit at gcc dot gnu.org
2021-04-27 13:34 ` jakub at gcc dot gnu.org
2021-05-04 12:08 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:21 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:26 ` cvs-commit 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).