https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86917
Bug ID: 86917 Summary: ICE in verify_ctor_sanity, at cp/constexpr.c:2798 Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hans.buchmann at fhnw dot ch Target Milestone: --- Created attachment 44526 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44526&action=edit The Bug Compiling the (wrong) code ------8<------8<------8<------8<------8<------8<------8<------ struct Byte { constexpr Byte():c(0){} static const Byte Zero; unsigned c; }; struct Word { typedef Byte W[4]; constexpr Word():w({Byte::Zero,Byte::Zero,Byte::Zero,Byte::Zero}){} W w; }; struct AES256 { AES256(); Word w[60]; }; AES256::AES256() { } ------8<------8<------8<------8<------8<------8<------8<------ with g++ -c -o bug.o bug.cc results in: ------8<------8<------8<------8<------8<------8<------8<------ bug.cc: In constructor \u2018AES256::AES256()\u2019: bug.cc:21:16: in \u2018constexpr\u2019 expansion of \u2018Word()\u2019 bug.cc:21:16: internal compiler error: in verify_ctor_sanity, at cp/constexpr.c:2798 AES256::AES256() ^ Please submit a full bug report, with preprocessed source if appropriate. ------8<------8<------8<------8<------8<------8<------8<------ g++ -v ------8<------8<------8<------8<------8<------8<------8<------ Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib \ --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info \ --with-bugurl=https://bugs.archlinux.org/ \ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \ --enable-shared --enable-threads=posix --enable-libmpx \ --with-system-zlib --with-isl --enable-__cxa_atexit \ --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch \ --disable-libssp --enable-gnu-unique-object --enable-linker-build-id \ --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu\ --enable-gnu-indirect-function --enable-multilib --disable-werror \ --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto Thread model: posix gcc version 8.2.0 (GCC) ------8<------8<------8<------8<------8<------8<------8<------ Sincerely Hans Buchmann