Bug 50761 - g++ internal compiler error using std::initializer_list
Summary: g++ internal compiler error using std::initializer_list
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.5.2
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2011-10-17 17:16 UTC by Stéphane Magnenat
Modified: 2011-10-17 17:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
broken code (177 bytes, text/x-c++src)
2011-10-17 17:16 UTC, Stéphane Magnenat
Details
correct code (178 bytes, text/x-c++src)
2011-10-17 17:16 UTC, Stéphane Magnenat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Magnenat 2011-10-17 17:16:40 UTC
Created attachment 25524 [details]
broken code

The C++11 code in attachment generates an internal compiler error in g++:

test.cpp: In function ‘int main()’:
test.cpp:19:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
Comment 1 Stéphane Magnenat 2011-10-17 17:16:56 UTC
Created attachment 25525 [details]
correct code
Comment 2 Jonathan Wakely 2011-10-17 17:21:22 UTC
already fixed in 4.6 and 4.7

when testing the experimental C++0x mode, please use the latest releases - there are hundreds of fixes since the 4.5 release series was branched
Comment 3 Jonathan Wakely 2011-10-17 17:28:57 UTC
.