public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103811] New: [c++20] ICE when a lambda is used as a template argument of another lambda's function parameter
@ 2021-12-22 21:26 iamsupermouse at mail dot ru
  2022-01-06  8:06 ` [Bug c++/103811] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: iamsupermouse at mail dot ru @ 2021-12-22 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103811
           Summary: [c++20] ICE when a lambda is used as a template
                    argument of another lambda's function parameter
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamsupermouse at mail dot ru
  Target Milestone: ---

Following code causes an ICE (segfault):

    template <auto> struct A {};
    int main() {[](A<[]{}>){};}

Tested on https://godbolt.org/ , GCC trunk 12.0.0 20211222.

The same thing happens if I move the nested lambda to A's default argument:

    template <auto = []{}> struct A {};
    int main() {[](A<>){};}

MSVC also ICEs on the second snippet, but not on the first.

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

* [Bug c++/103811] [c++20] ICE when a lambda is used as a template argument of another lambda's function parameter
  2021-12-22 21:26 [Bug c++/103811] New: [c++20] ICE when a lambda is used as a template argument of another lambda's function parameter iamsupermouse at mail dot ru
@ 2022-01-06  8:06 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-06  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-01-06
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

end of thread, other threads:[~2022-01-06  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 21:26 [Bug c++/103811] New: [c++20] ICE when a lambda is used as a template argument of another lambda's function parameter iamsupermouse at mail dot ru
2022-01-06  8:06 ` [Bug c++/103811] " pinskia 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).