public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992
@ 2023-05-09 16:11 eric.niebler at gmail dot com
  2023-05-09 16:12 ` [Bug c++/109790] " eric.niebler at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: eric.niebler at gmail dot com @ 2023-05-09 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109790
           Summary: internal compiler error in write_member_name, at
                    cp/mangle.cc:2992
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Created attachment 55032
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55032&action=edit
the result of -freport-bug

Compile the attached test_when_all.i.cpp with:

  g++ -std=c++20 -fext-numeric-literals -Wno-non-template-friend \
    test_when_all.i.cpp

Result:

In file included from
/home/eniebler/Code/stdexec/include/stdexec/execution.hpp:35,
                 from
/home/eniebler/Code/stdexec/test/stdexec/algos/adaptors/test_when_all.cpp:18:
/home/eniebler/Code/stdexec/include/stdexec/__detail/__tuple.hpp: In
instantiation of ‘constexpr stdexec::__tup::__tuple_for<_Ts ...>
stdexec::__tup::__make_tuple_fn::operator()(_Ts ...) const [with _Ts =
{____C_A_T_C_H____T_E_S_T____24()::<lambda(int, int, int)>}]’:
/home/eniebler/Code/stdexec/include/stdexec/__detail/__tuple.hpp:284:37:  
required from here
/home/eniebler/Code/stdexec/include/stdexec/__detail/__tuple.hpp:284:37:
internal compiler error: in write_member_name, at cp/mangle.cc:2992
  284 |       constexpr __tuple_for<_Ts...> operator()(_Ts... __ts) const
      |                                     ^~~~~~~~
0x9acf33 write_member_name
        ../../gcc/cp/mangle.cc:2992
0x9ace8f write_member_name
        ../../gcc/cp/mangle.cc:2999
0x9ad8ce write_expression
        ../../gcc/cp/mangle.cc:3668
0x9adecc write_expression
        ../../gcc/cp/mangle.cc:3592
0x9b290c write_type
        ../../gcc/cp/mangle.cc:2489
0x9b198c write_template_args
        ../../gcc/cp/mangle.cc:2966
0x9b7e2f write_nested_name
        ../../gcc/cp/mangle.cc:1154
0x9b26de write_class_enum_type
        ../../gcc/cp/mangle.cc:2937
0x9b26de write_type
        ../../gcc/cp/mangle.cc:2362
0x9b6739 write_bare_function_type
        ../../gcc/cp/mangle.cc:2856
0x9b699b write_mangled_name
        ../../gcc/cp/mangle.cc:799
0x9b8827 mangle_decl_string
        ../../gcc/cp/mangle.cc:4143
0x9b8ac8 get_mangled_id
        ../../gcc/cp/mangle.cc:4164
0x9b8ac8 mangle_decl(tree_node*)
        ../../gcc/cp/mangle.cc:4202
0x15934b5 decl_assembler_name(tree_node*)
        ../../gcc/tree.cc:715
0x15c6d59 assign_assembler_name_if_needed(tree_node*)
        ../../gcc/tree.cc:830
0xd126f1 cgraph_node::analyze()
        ../../gcc/cgraphunit.cc:677
0xd15f7a analyze_functions
        ../../gcc/cgraphunit.cc:1247
0xd170ed symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2554
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug c++/109790] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
@ 2023-05-09 16:12 ` eric.niebler at gmail dot com
  2023-05-09 16:18 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: eric.niebler at gmail dot com @ 2023-05-09 16:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Eric Niebler <eric.niebler at gmail dot com> ---
Possible dupe of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100632

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

* [Bug c++/109790] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
  2023-05-09 16:12 ` [Bug c++/109790] " eric.niebler at gmail dot com
@ 2023-05-09 16:18 ` pinskia at gcc dot gnu.org
  2023-05-09 19:39 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-09 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
reducing ...

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

* [Bug c++/109790] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
  2023-05-09 16:12 ` [Bug c++/109790] " eric.niebler at gmail dot com
  2023-05-09 16:18 ` pinskia at gcc dot gnu.org
@ 2023-05-09 19:39 ` pinskia at gcc dot gnu.org
  2023-05-09 22:25 ` [Bug c++/109790] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-09 19:39 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |c++-lambda,
                   |                            |ice-on-valid-code

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Eric Niebler from comment #1)
> Possible dupe of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100632

It is unrelated. it seems more lambda related while I am reducing it.

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

* [Bug c++/109790] [11/12/13/14 Regression] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
                   ` (2 preceding siblings ...)
  2023-05-09 19:39 ` pinskia at gcc dot gnu.org
@ 2023-05-09 22:25 ` pinskia at gcc dot gnu.org
  2023-05-09 22:54 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-09 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.4
   Last reconfirmed|                            |2023-05-09
     Ever confirmed|0                           |1
           Keywords|                            |needs-bisection
      Known to fail|                            |10.1.0, 11.1.0, 8.5.0,
                   |                            |9.3.0
            Summary|internal compiler error in  |[11/12/13/14 Regression]
                   |write_member_name, at       |internal compiler error in
                   |cp/mangle.cc:2992           |write_member_name, at
                   |                            |cp/mangle.cc:2992
      Known to work|                            |10.3.0, 10.4.0, 9.4.0,
                   |                            |9.5.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced:
```
auto ll = [](auto ... ){};
template <class _Impl, class _Args>
  void mm(void (_Impl::*__p)(_Args) const);
template <class _Ts>
using __impl_for = decltype(mm(&decltype(ll)::operator()<_Ts>));
template <class _Ts> __impl_for<_Ts> f() { }
void aaa() {
  f<int>();
}
```
as far as I can tell the above is valid C++17 code.
It was rejected in 10.1.0, 9.3.0 8.5.0 and started to ICE in 11.1.0. But it was
accepted in 10.3.0 10.4.0 9.5.0 9.4.0.

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

* [Bug c++/109790] [11/12/13/14 Regression] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
                   ` (3 preceding siblings ...)
  2023-05-09 22:25 ` [Bug c++/109790] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
@ 2023-05-09 22:54 ` mpolacek at gcc dot gnu.org
  2023-05-10  7:06 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-05-09 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
In GCC 11, the code in comment 4 started to be accepted with r11-2420:

commit 2c58f5cadfac338a67723fd6e41c9097760c4a33
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Jul 29 22:06:44 2020 -0400

    c++: overload sets and placeholder return type [PR64194]

and started to ICE with r11-6301:

commit 027935eec43173a89cd3eeace0b51967288ac075
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Dec 21 17:31:16 2020 -0500

    c++: Add some asserts in mangle.c

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

* [Bug c++/109790] [11/12/13/14 Regression] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
                   ` (4 preceding siblings ...)
  2023-05-09 22:54 ` mpolacek at gcc dot gnu.org
@ 2023-05-10  7:06 ` rguenth at gcc dot gnu.org
  2023-05-16 12:33 ` ppalka at gcc dot gnu.org
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-10  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/109790] [11/12/13/14 Regression] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
                   ` (5 preceding siblings ...)
  2023-05-10  7:06 ` rguenth at gcc dot gnu.org
@ 2023-05-16 12:33 ` ppalka at gcc dot gnu.org
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-05-16 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

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

--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Here's a non-lambda version that ICEs in the same spot:

struct A {
  template<class T> void operator+(T);
};

template<class T>
decltype(&A::operator+<T>) f();

int main() {
  f<int>();
}

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

* [Bug c++/109790] [11/12/13/14 Regression] internal compiler error in write_member_name, at cp/mangle.cc:2992
  2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
                   ` (6 preceding siblings ...)
  2023-05-16 12:33 ` ppalka at gcc dot gnu.org
@ 2023-05-29 10:08 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2023-05-29 10:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 16:11 [Bug c++/109790] New: internal compiler error in write_member_name, at cp/mangle.cc:2992 eric.niebler at gmail dot com
2023-05-09 16:12 ` [Bug c++/109790] " eric.niebler at gmail dot com
2023-05-09 16:18 ` pinskia at gcc dot gnu.org
2023-05-09 19:39 ` pinskia at gcc dot gnu.org
2023-05-09 22:25 ` [Bug c++/109790] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org
2023-05-09 22:54 ` mpolacek at gcc dot gnu.org
2023-05-10  7:06 ` rguenth at gcc dot gnu.org
2023-05-16 12:33 ` ppalka at gcc dot gnu.org
2023-05-29 10:08 ` 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).