[Bug c++/51488] New: ICE on infinite template recursion
cas43 at cs dot stanford.edu
gcc-bugzilla@gcc.gnu.org
Fri Dec 9 23:09:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51488
Bug #: 51488
Summary: ICE on infinite template recursion
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: cas43@cs.stanford.edu
OFFENDING CODE:
template<class T,class U=void> struct s;
template<class T> struct s<T,typename s<T>::a> {};
s<int> ca;
HOW TO REPRODUCE:
g++ file.cpp
WHAT HAPPENS:
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
WHICH COMPILERS PRODUDE THIS RESULT:
I have tried with 6 different versions of gcc, and it fails the same way with
each:
#1:
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/i-4.7/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/i-4.7/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.7/configure --prefix=/home/cas43/new-gcc/i-4.7
Thread model: posix
gcc version 4.7.0 20111208 (experimental) (GCC)
#2:
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/i-4.6/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/i-4.6/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.6/configure --prefix=/home/cas43/new-gcc/i-4.6
Thread model: posix
gcc version 4.6.3 20111121 (prerelease) (GCC)
#3:
Using built-in specs.
COLLECT_GCC=/home/cas43/new-gcc/i-4.5/bin/g++
COLLECT_LTO_WRAPPER=/home/cas43/new-gcc/i-4.5/libexec/gcc/x86_64-unknown-linux-gnu/4.5.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.5/configure --prefix=/home/cas43/new-gcc/i-4.5
Thread model: posix
gcc version 4.5.4 20111208 (prerelease) (GCC)
#4:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../s-4.4/configure --prefix=/home/cas43/new-gcc/i-4.4
Thread model: posix
gcc version 4.4.7 20111208 (prerelease) (GCC)
#5:
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
--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-plugin --enable-objc-gc
--disable-werror --with-arch-32=i486 --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.4.3 (Ubuntu 4.4.3-4ubuntu5)
#6:
Using built-in specs.
COLLECT_GCC=g++
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)
More information about the Gcc-bugs
mailing list