[Bug c++/55879] New: [C++11][constexpr] nested constexpr Initialisation raises internal compiler error
npl at chello dot at
gcc-bugzilla@gcc.gnu.org
Fri Jan 4 19:40:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55879
Bug #: 55879
Summary: [C++11][constexpr] nested constexpr Initialisation
raises internal compiler error
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: npl@chello.at
Created attachment 29084
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29084
code to raise the error
Compiling the added code results in an internal compiler error, I tested this
with GCC 4.6.3 and 4.7.2, both fail at different lines though. Some notes:
for 4.7.2:
*) I tested using a defaulted copy-constructor, this fixes the issue
*) removing the constexpr fixes the issue
for 4.6.3:
*) I havent tested the provided code itself (have no access to 4.6.3 right
now), I used slightly bigger version of the code. Im hopefull it still causes
trouble.
*) the important part is to use an external variable but have an additional
entry in the array with an constant
I dint provide a preprocessed source because I hope this is a sufficiently
small piece to reproduce the error easily. Since this seems a rather fragile
issue right now I guess it would be a good idea to create some bigger tests and
check other gcc versions aswell - thats the reason I have code to break both
versions in one file instead of simplifying it further.
---------------Command used (4.7.2/4.6.3 respectively):
g++ -std=c++11 nestedconstexpr.cpp
g++ -std=c++09 nestedconstexpr.cpp
---------------Compiler version:
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-4)
More information about the Gcc-bugs
mailing list