[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c++/114901] New: GCC internal_error on CTAD alias
From:       "hokein.wu at gmail dot com via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2024-04-30 20:20:38
Message-ID: bug-114901-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

            Bug ID: 114901
           Summary: GCC internal_error on CTAD alias
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hokein.wu at gmail dot com
  Target Milestone: ---

GCC (trunk) crashes on the following code:

https://godbolt.org/z/43Tqf4qs9


```
template <class D>
constexpr bool C = sizeof(D);


template <typename U>
struct T {

  template<typename V, typename N>
  struct Foo {
    Foo(V, N);
  };

  template<typename X, typename N>
  requires (C<N>) // removes the require-clause will make the crash disappear
  Foo(X, N) -> Foo<X, N>;

  template <typename Y, typename Y2, int N = sizeof(Y2)>
  using AFoo = Foo<decltype(N), Y2>;
};

T<double>::AFoo s{1, 2};

```=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic