[Bug c++/102548] gcc segmentation fault in cc1plus (with repro case)

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 30 22:18:59 GMT 2021


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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
reduced almost all the way:
typedef decltype(sizeof(0)) size_t;
struct tm;
extern "C"
size_t __attribute__((__cdecl__)) strftime(char * __restrict__ _Buf,size_t
_SizeInBytes,const char * __restrict__ _Format,const struct tm * __restrict__
_Tm);
void f(void)
{
  using T = size_t(__attribute__((__stdcall__))*)(char*, size_t, const char*,
const struct tm*);
  auto loadStrftime = [] {
    return strftime;
  };
  static T strftime = loadStrftime();
}


More information about the Gcc-bugs mailing list