2010/9/7 Nathan Ridge <zeratul...@hotmail.com>: > > 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.
With a recent build (gcc version 4.6.0 20100819 (experimental) (GCC)), I see no crash: $ g++ -std=c++0x test.cpp /tmp/ccSLxvPo.o: In function `void f<>()': test.cpp:(.text._Z1fIIEEvDpRKT_[void f<>()]+0x31): undefined reference to `my_vector<int>::my_vector(std::initializer_list<int>)' collect2: ld returned 1 exit status I suspect we don't want to put a lot of effort into fixing C++0x experimental support in GCC 4.4.x. -- James