From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27851 invoked by alias); 4 Jan 2013 19:40:45 -0000 Received: (qmail 25025 invoked by uid 48); 4 Jan 2013 19:39:22 -0000 From: "npl at chello dot at" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55879] New: [C++11][constexpr] nested constexpr Initialisation raises internal compiler error Date: Fri, 04 Jan 2013 19:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: npl at chello dot at X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00345.txt.bz2 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)