public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "npl at chello dot at" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-55879-4@http.gcc.gnu.org/bugzilla/> (raw)


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)


             reply	other threads:[~2013-01-04 19:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 19:40 npl at chello dot at [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-55879-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).