Hi folks, I've encounterd a bug with GCC 9.1.0 on the mingw-w64 target. g++ is built as a cross-compiler running on 64-bit GNU/Linux (glibc 2.29, linux 5.1.2)... $ x86_64-w64-mingw32-g++ -v ./XXXX/configure --prefix=/usr --target=x86_64-w64-mingw32 --enable-targets=x86_64-w64-mingw32,mingw32 --with-system-zlib --enable-languages=c,c++ --enable-c-mbchar --enable-__cxa_atexit --disable-libatomic --disable-libgomp --disable-libmpx --disable-libquadmath --disable-libssp --disable-libvtv
Steps to reproduce... test.cpp: static void __stdcall func() {} template <typename T> struct foo { virtual ~foo() {} }; int main() { foo<decltype(func)> x; return 0; } $ x86_64-w64-mingw32-g++ -Wall -Wextra -pedantic -std=c++11 -m32 test.cpp cc1plus: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. This happens only with the -m32 flag and __stdcall functions. Regards, HY