[Bug c++/53781] New: ICE when compiling a deeply nested template

2012-06-26 Thread oleg00 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53781

 Bug #: 53781
   Summary: ICE when compiling a deeply nested template
Classification: Unclassified
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ole...@gmail.com


gcc 4.7.0 crashed when the template nesting level approaches ~35. The code
compiles fine on gcc 4.5.0

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/jpm/ro/3rd/gcc/4.7.0-g++/x86_64-linux-2.6-libc6/libexec/gcc/x86_64-aim-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-aim-linux-gnu
Configured with: ../../src/configure --prefix=/jpm/ro/3rd/gcc/4.7.0-g++/common
--exec-prefix=/jpm/ro/3rd/gcc/4.7.0-g++/x86_64-linux-2.6-libc6
--host=x86_64-aim-linux-gnu --build=x86_64-aim-linux-gnu
--target=x86_64-aim-linux-gnu
--prefix=/jpm/ro/3rd/gcc/4.7.0-g++/x86_64-linux-2.6-libc6
--with-local-prefix=/jpm/ro/3rd/gcc/4.7.0-g++/x86_64-linux-2.6-libc6
--libdir=/jpm/ro/3rd/gcc-runtime/4.7.0-g++/x86_64-linux-2.6-libc6/lib
--oldincludedir=/jpm/ro/3rd/glibc/2.13/x86_64-linux-2.6-libc6/include
--with-gxx-include-dir=/jpm/ro/3rd/gcc/4.7.0-g++/x86_64-linux-2.6-libc6/include
--disable-bootstrap --disable-multilib --disable-nls --enable-shared
--enable-languages=c,c++ --enable-__cxa_atexit CFLAGS='-g -O2 -D__USE_XOPEN2K8'
CXXFLAGS='-g -O2 -D__USE_XOPEN2K8' 'XGCC_FLAGS_FOR_TARGET=-g -O2
-D__USE_XOPEN2K8'
Thread model: posix
gcc version 4.7.0 (GCC)

Preprocessed source is attached.

Compile with:
c++ -O3 -std=c++0x -DNDEBUG gcc.bug.cpp


[Bug c++/53781] ICE when compiling a deeply nested template

2012-06-26 Thread oleg00 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53781

--- Comment #1 from Oleg Grunin  2012-06-26 16:51:15 
UTC ---
Created attachment 27707
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27707
bzipped precompiled source part 1


[Bug c++/53781] ICE when compiling a deeply nested template

2012-06-26 Thread oleg00 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53781

--- Comment #2 from Oleg Grunin  2012-06-26 16:52:17 
UTC ---
Created attachment 27708
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27708
bzipped precompiled source part 2


[Bug c++/53781] ICE when compiling a deeply nested template

2012-06-26 Thread oleg00 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53781

Oleg Grunin  changed:

   What|Removed |Added

 CC||oleg00 at gmail dot com
Version|unknown |4.7.0

--- Comment #3 from Oleg Grunin  2012-06-26 16:55:15 
UTC ---
To recreate the precompiled source:

cat xaa xab > gnu.bug.cpp.bz2
bunzip gnu.bug.cpp.bz2