public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102470] New: C++20 NTTP causes ICE
@ 2021-09-23 12:59 iDingDong at outlook dot com
  2021-09-23 13:05 ` [Bug c++/102470] " iDingDong at outlook dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: iDingDong at outlook dot com @ 2021-09-23 12:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102470
           Summary: C++20 NTTP causes ICE
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iDingDong at outlook dot com
  Target Milestone: ---

GCC 11.2 reports ICE to the following piece of code:

//---
#include <concepts>

template <typename T> struct A {
        A(A<T> const&) = default;
};

template <std::same_as<int> T> struct A<T> {
        A(A<T> const&) = default;
};
//---

Compiled with:

> gcc -std=c++20 test.cpp

The error message:

> gcc -std=c++20 test.cpp
> test.cpp: In substitution of 'template<MemAttr attr> using AlignedStorage = std::aligned_storage_t<((const MemAttr)attr).size, ((const MemAttr)attr).align> [with MemAttr attr = memAttrOf<T>]':
> test.cpp:13:75:   required from here
> test.cpp:11:73: internal compiler error: Segmentation fault
>    11 | template <MemAttr attr> using AlignedStorage = ::std::aligned_storage_t<attr.size, attr.align>;
>       |                                                                         ^~~~
> libbacktrace could not find executable to open
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <https://gcc.gnu.org/bugs/> for instructions.

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

end of thread, other threads:[~2023-11-16 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 12:59 [Bug c++/102470] New: C++20 NTTP causes ICE iDingDong at outlook dot com
2021-09-23 13:05 ` [Bug c++/102470] " iDingDong at outlook dot com
2023-11-16  0:58 ` arthur.j.odwyer at gmail dot com
2023-11-16 15:38 ` ppalka 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).