public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/108971] New: [13 Regression] ICE in tree_profiling, at tree-profile.cc:724
@ 2023-02-28 17:08 asolokha at gmx dot com
  2023-03-01  7:46 ` [Bug c++/108971] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2023-02-28 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108971
           Summary: [13 Regression] ICE in tree_profiling, at
                    tree-profile.cc:724
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, lto
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

gcc 13.0.1 20230226 snapshot (g:e6d39f68d03c46637ca6e1bede3d28eae6278df3) ICEs
when compiling the following testcase, reduced from
gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C, w/ -std=c++2a
-fbranch-probabilities -flto -fno-inline:

template<typename T>
concept C1 = __is_same_as(T, int);

template<typename T>
concept IsNotTiny = !__is_same_as(T, char);

void
foo ()
{
  auto g = []<C1 T> requires IsNotTiny<T>(T t) -> T
    requires IsNotTiny<decltype(t)> { return t; };

  [](auto t) requires true { return t; }(5);
  [](C1 auto t) { return t; }(5);

  auto a0 = [](IsNotTiny auto a) { return [](auto b){ return b; }; };
  auto a1 = a0(1);
}

% g++-13 -std=c++2a -fbranch-probabilities -flto -fno-inline -c sanpvd3f.C
sanpvd3f.C:16:13: error: mangling of 'foo()::<lambda(auto:3)> [with auto:3 =
int]' as '_ZZ3foovENKUlT_E1_clIiEEDaS_' conflicts with a previous mangle
   16 |   auto a0 = [](IsNotTiny auto a) { return [](auto b){ return b; }; };
      |             ^
sanpvd3f.C:14:3: note: previous mangling 'int
foo()::<lambda(auto:2)>::_ZZ3foovENKUlT_E1_clIiEEDaS_(int) const'
   14 |   [](C1 auto t) { return t; }(5);
      |   ^
sanpvd3f.C:16:13: note: a later '-fabi-version=' (or =0) avoids this error with
a change in mangling
   16 |   auto a0 = [](IsNotTiny auto a) { return [](auto b){ return b; }; };
      |             ^
during IPA pass: profile
sanpvd3f.C:18:1: internal compiler error: in tree_profiling, at
tree-profile.cc:724
   18 | }
      | ^
0x859ae9 tree_profiling
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-profile.cc:724
0x859ae9 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-profile.cc:888

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

* [Bug c++/108971] [13 Regression] ICE in tree_profiling, at tree-profile.cc:724
  2023-02-28 17:08 [Bug lto/108971] New: [13 Regression] ICE in tree_profiling, at tree-profile.cc:724 asolokha at gmx dot com
@ 2023-03-01  7:46 ` rguenth at gcc dot gnu.org
  2023-03-01 10:41 ` jakub at gcc dot gnu.org
  2023-03-09 21:59 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-01  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-03-01
           Keywords|ice-on-invalid-code         |ice-on-valid-code,
                   |                            |needs-bisection,
                   |                            |rejects-valid
                 CC|                            |hubicka at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
          Component|lto                         |c++

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Happens at compile-time.

Note without -flto the code is accepted, so I suspect some interaction with
free-lang-data here?

Confirmed.

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

* [Bug c++/108971] [13 Regression] ICE in tree_profiling, at tree-profile.cc:724
  2023-02-28 17:08 [Bug lto/108971] New: [13 Regression] ICE in tree_profiling, at tree-profile.cc:724 asolokha at gmx dot com
  2023-03-01  7:46 ` [Bug c++/108971] " rguenth at gcc dot gnu.org
@ 2023-03-01 10:41 ` jakub at gcc dot gnu.org
  2023-03-09 21:59 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-03-01 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

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> ---
I bet really dup of PR107897.  At least until that one is fixed, there is not
much point analyzing other PRs with similar problems.

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

* [Bug c++/108971] [13 Regression] ICE in tree_profiling, at tree-profile.cc:724
  2023-02-28 17:08 [Bug lto/108971] New: [13 Regression] ICE in tree_profiling, at tree-profile.cc:724 asolokha at gmx dot com
  2023-03-01  7:46 ` [Bug c++/108971] " rguenth at gcc dot gnu.org
  2023-03-01 10:41 ` jakub at gcc dot gnu.org
@ 2023-03-09 21:59 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-09 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |jason at gcc dot gnu.org
             Status|NEW                         |RESOLVED

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Yes, dup.

*** This bug has been marked as a duplicate of bug 107897 ***

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

end of thread, other threads:[~2023-03-09 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 17:08 [Bug lto/108971] New: [13 Regression] ICE in tree_profiling, at tree-profile.cc:724 asolokha at gmx dot com
2023-03-01  7:46 ` [Bug c++/108971] " rguenth at gcc dot gnu.org
2023-03-01 10:41 ` jakub at gcc dot gnu.org
2023-03-09 21:59 ` jason 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).