This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56291] New: ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: "freddie_chopin at op dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Feb 2013 23:32:49 +0000
- Subject: [Bug c++/56291] New: ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56291
Bug #: 56291
Summary: ICE for C++11 in output_constructor_regular_field, at
varasm.c:4821
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: freddie_chopin@op.pl
[freddie@arch ~]$ cat file.cpp
class Base
{
public:
constexpr Base() : v(1) {};
int v;
};
class Derived : public Base
{
public:
constexpr Derived() : Base() {};
virtual void function();
};
Derived d;[freddie@arch ~]$ g++ -std=c++11 -c file.cpp
file.cpp:15:10: internal compiler error: in output_constructor_regular_field,
at varasm.c:4821
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
[freddie@arch ~]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7.2/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 --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id
--with-ppl --enable-cloog-backend=isl --disable-ppl-version-check
--disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default
--enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu
--enable-multilib --disable-libssp --disable-build-with-cxx
--disable-build-poststage1-with-cxx --enable-checking=release
Thread model: posix
gcc version 4.7.2 (GCC)
---------------
Each of the listed things makes the problem go away:
- making function() non-virtual (or removing it)
- making both or at least Derived's constructor non-constexpr
- removing the member field "v" from Base (along with the initializer in the
constructor)
I've tested with g++, x86_64-w64-mingw32-g++, i686-w64-mingw32-g++ (all on
Linux), arm-none-eabi-g++, mingw32-g++ (both on Windows), all the toolchains I
have are 4.7.2 and in each of them the problem is identical. I've also have the
same error with 4.6.2 arm-none-eabi-g++.
Is anything more needed? Maybe this is already fixed (and/or reported)?
Thx in advance!
- Follow-Ups:
- [Bug c++/56291] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: paolo.carlini at oracle dot com
- [Bug c++/56291] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: freddie_chopin at op dot pl
- [Bug c++/56291] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: freddie_chopin at op dot pl
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jakub at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: freddie_chopin at op dot pl
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jakub at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: freddie_chopin at op dot pl
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jakub at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: freddie_chopin at op dot pl
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: paolo.carlini at oracle dot com
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jason at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jason at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jason at gcc dot gnu.org
- [Bug c++/56291] [4.6/4.7/4.8 Regression] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821
- From: jason at gcc dot gnu.org