public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108563] New: [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v<type>)
@ 2023-01-26 21:43 ldalessandro at gmail dot com
  2023-02-06 13:40 ` [Bug c++/108563] [10/11/12/13 Regression] [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v<type>) since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ldalessandro at gmail dot com @ 2023-01-26 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108563
           Summary: [concepts] ICE (segfault) when requiring
                    sizeof(variable_tempalate_v<type>)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldalessandro at gmail dot com
  Target Milestone: ---

The following valid code causes an ICE (segfault)

    template <class T>
    struct foo {
        static constexpr int value = 0;
    };

    template <class T>
    inline constexpr int foo_v = foo<T>::value;

    static_assert(requires {  sizeof(foo_v<int>); });

Workaround is to use `foo<int>::value` instead of the variable template.

Live example: https://godbolt.org/z/s7szdEdeP

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

end of thread, other threads:[~2023-07-07 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 21:43 [Bug c++/108563] New: [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v<type>) ldalessandro at gmail dot com
2023-02-06 13:40 ` [Bug c++/108563] [10/11/12/13 Regression] [concepts] ICE (segfault) when requiring sizeof(variable_tempalate_v<type>) since r10-7441-ga7ea3d2ced786c45 marxin at gcc dot gnu.org
2023-02-06 13:52 ` ppalka at gcc dot gnu.org
2023-03-05 19:53 ` ppalka at gcc dot gnu.org
2023-03-15 10:01 ` [Bug c++/108563] [10/11/12 " rguenth at gcc dot gnu.org
2023-07-07 10:44 ` [Bug c++/108563] [11/12 " rguenth 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).