g++ segfault when using C++0x feature‏

Nathan Ridge zeratul976@hotmail.com
Tue Sep 7 19:33:00 GMT 2010


Hello,

The attached minimal code (test.cpp) causes g++ to 
segfault. It uses the C++0x features variadic templates and initializer 
lists.

The command used to compile it is:

g++ -std=c++0x test.cpp

The output is:

test.cpp: In function آ‘void f(const Args& ...) [with Args = ]آ’:
test.cpp:21:آ آ  instantiated from here
test.cpp:16: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.

The output of "g++ -v" is:

Using built-in specs.
Target: i486-linux-gnu
Configured
 with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' 
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--enable-shared --enable-multiarch --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 
--program-suffix=-4.4 --enable-nls --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-objc-gc --enable-targets=all 
--disable-werror --with-arch-32=i486 --with-tune=generic 
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu 
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) 

I also attached the preprocessed source file, as requested (test.ii when compiling using -save-temps).

Please let me know if you need any more information.

Regards,
Nate. 		 	   		  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 374 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20100907/003b9da6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ii
Type: application/octet-stream
Size: 2817 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20100907/003b9da6/attachment.obj>


More information about the Gcc mailing list