public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/112696] New: ICE When specializing auto... parameter pack with typed pack
@ 2023-11-24  8:03 mrcmnn at gmail dot com
  2023-11-24  8:15 ` [Bug c++/112696] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: mrcmnn at gmail dot com @ 2023-11-24  8:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112696
           Summary: ICE When specializing auto... parameter pack with
                    typed pack
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mrcmnn at gmail dot com
  Target Milestone: ---

Hi everybody!

I'm experiencing ICE when trying to specialize an `<auto...>` parameter pack in
a struct. My main use-case involves concept, but I've been able to reproduce
the problem without.

I can reproduce this in g++ 10.5/11.4/12.3/13.2.

The reproduction looks like:

```c++
template <auto...>
struct sum;

template <int s, typename...Sz, Sz...sz>
struct sum<s, sz...> {
    static constexpr int value = (s + ... + sz);
};

static_assert(sum<10, 1, 2>::value == 13);
```

Consider that replacing `typename...Sz, Sz...sz` with `auto...` works:

```c++
template <auto...>
struct sum;

template <int s, auto...sz>
struct sum<s, sz...> {
    static constexpr int value = (s + ... + sz);
};

static_assert(sum<10, 1, 2>::value == 13);
```

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

* [Bug c++/112696] ICE When specializing auto... parameter pack with typed pack
  2023-11-24  8:03 [Bug c++/112696] New: ICE When specializing auto... parameter pack with typed pack mrcmnn at gmail dot com
@ 2023-11-24  8:15 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-24  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-11-24
             Status|UNCONFIRMED                 |NEW

--- 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:[~2023-11-24  8:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24  8:03 [Bug c++/112696] New: ICE When specializing auto... parameter pack with typed pack mrcmnn at gmail dot com
2023-11-24  8:15 ` [Bug c++/112696] " 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).