public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55879] New: [C++11][constexpr] nested constexpr Initialisation raises internal compiler error
@ 2013-01-04 19:40 npl at chello dot at
  2013-01-07 16:59 ` [Bug c++/55879] " paolo.carlini at oracle dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: npl at chello dot at @ 2013-01-04 19:40 UTC (permalink / raw)
  To: gcc-bugs


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)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-15 19:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04 19:40 [Bug c++/55879] New: [C++11][constexpr] nested constexpr Initialisation raises internal compiler error npl at chello dot at
2013-01-07 16:59 ` [Bug c++/55879] " paolo.carlini at oracle dot com
2013-01-07 23:25 ` [Bug c++/55879] [C++11] " daniel.kruegler at googlemail dot com
2013-01-08 19:31 ` npl at chello dot at
2013-01-08 20:26 ` daniel.kruegler at googlemail dot com
2013-02-13 17:57 ` jason at gcc dot gnu.org
2013-02-13 18:05 ` jason at gcc dot gnu.org
2013-02-15 19:32 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).