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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Small testcase:
pr105297.h:

constexpr auto
foo ()
{
  struct S { unsigned char d[1u << __CHAR_BIT__] = {}; } t;
  return t;
}

template <int N>
unsigned char
bar (unsigned char x)
{
  static constexpr auto t = foo ();
  return t.d[x];
}

./cc1plus -o pr105297.{s,h} -fmodule-header

Reply via email to