Menu

#277 ICE during instantiation of in-class static constexpr std::array

None
open
nobody
None
1
2015-08-06
2015-08-06
No

I've attached a simple test showing an internal compiler error when trying to use a std::array inside a traits template.

$ gcc -o test.exe main.cpp -std=c++14
main.cpp: In instantiation of 'constexpr const std::array<unsigned char,="" 3u=""> test<int>::test2':
main.cpp:21:28: required from here
main.cpp:16:41: internal compiler error: in reshape_init_r, at cp/decl.c:5704
static constexpr std::array<uint8_t,3> test2 = std::array<uint8_t, 3=""> {{0,1,1}};</uint8_t,></uint8_t,3></int></unsigned>

Windows 8.1 x64 w/ msys

$ ld -v
GNU ld (GNU Binutils) 2.24

$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\Mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/Mingw/bin/../libexec/gcc/mingw32/5.1.0/lto-wrapper.exe
Target: mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=mingw32 --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --disable-symvers --enable-cxx-flags='-fno-function-sections -fno-data-sections -DWINPTHREAD_STATIC' --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm--with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 5.1.0 (tdm-1)

1 Attachments

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo