https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61670

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
I checked 2 versions of the compiler, built with rather different options.

$ /tmp/gcc-trunk/inst/bin/g++ -v au.ii
Using built-in specs.
COLLECT_GCC=/tmp/gcc-trunk/inst/bin/g++
COLLECT_LTO_WRAPPER=/tmp/gcc-trunk/inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /data/repos/gcc/trunk/configure --prefix=/tmp/gcc-trunk/inst
--enable-languages=c,c++ --with-system-zlib --disable-nls
--enable-libstdcxx-time=yes --disable-bootstrap --disable-libgomp
--disable-libitm --disable-libquadmath --disable-libatomic --disable-libssp
--disable-multilib --disable-libsanitizer --disable-libvtv --disable-libcilkrts
Thread model: posix
gcc version 5.0.0 20141214 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /tmp/gcc-trunk/inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1plus
-fpreprocessed au.ii -quiet -dumpbase au.ii -mtune=generic -march=x86-64
-auxbase au -version -o /tmp/ccnPdFYY.s
GNU C++ (GCC) version 5.0.0 20141214 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p3,
MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 5.0.0 20141214 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version 3.1.2-p3,
MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b5315edcdb3bca01922ebdd9643a9265
au.ii:3:3: error: expected ';' at end of member declaration
   0
   ^
au.ii: In instantiation of 'class A<int>':
au.ii:6:8:   required from here
au.ii:3:3: error: 'A< <template-parameter-1-1> >::<anonymous>' has incomplete
type
au.ii:1:24: note: definition of 'class A<int>' is not complete until the
closing brace
 template <class> class A {
                        ^
au.ii:1:24: internal compiler error: Segmentation fault
0xf69874 crash_signal
    /data/repos/gcc/trunk/gcc/toplev.c:358
0x1263b61 tree_nop_conversion
    /data/repos/gcc/trunk/gcc/tree.c:11711
0x1263dfb tree_strip_nop_conversions(tree_node*)
    /data/repos/gcc/trunk/gcc/tree.c:11750
0x1240839 integer_zerop(tree_node const*)
    /data/repos/gcc/trunk/gcc/tree.c:2176
0x7e8ee2 remove_zero_width_bit_fields
    /data/repos/gcc/trunk/gcc/cp/class.c:5313
0x7edb59 layout_class_type
    /data/repos/gcc/trunk/gcc/cp/class.c:6251
0x7ef32a finish_struct_1(tree_node*)
    /data/repos/gcc/trunk/gcc/cp/class.c:6473
0x781aae instantiate_class_template_1
    /data/repos/gcc/trunk/gcc/cp/pt.c:9592
0x781cbe instantiate_class_template(tree_node*)
    /data/repos/gcc/trunk/gcc/cp/pt.c:9632
0x871398 complete_type(tree_node*)
    /data/repos/gcc/trunk/gcc/cp/typeck.c:136
0x719a7c start_decl_1(tree_node*, bool)
    /data/repos/gcc/trunk/gcc/cp/decl.c:4862
0x719885 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
    /data/repos/gcc/trunk/gcc/cp/decl.c:4825
0x844bee cp_parser_init_declarator
    /data/repos/gcc/trunk/gcc/cp/parser.c:17082
0x83bde6 cp_parser_simple_declaration
    /data/repos/gcc/trunk/gcc/cp/parser.c:11548
0x83bbdf cp_parser_block_declaration
    /data/repos/gcc/trunk/gcc/cp/parser.c:11429
0x83b963 cp_parser_declaration
    /data/repos/gcc/trunk/gcc/cp/parser.c:11326
0x83b518 cp_parser_declaration_seq_opt
    /data/repos/gcc/trunk/gcc/cp/parser.c:11212
0x82eeb6 cp_parser_translation_unit
    /data/repos/gcc/trunk/gcc/cp/parser.c:4102
0x8648bf c_parse_file()
    /data/repos/gcc/trunk/gcc/cp/parser.c:32222
0x9d8096 c_common_parse_file()
    /data/repos/gcc/trunk/gcc/c-family/c-opts.c:1039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


$ /tmp/gcc/inst/bin/g++ -v au.ii 
Using built-in specs.
COLLECT_GCC=/tmp/gcc/inst/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 20141209-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id
--disable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5.0-snap-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5.0-snap-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5.0-snap-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--disable-werror --enable-checking=yes --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.0.0 20141209 (experimental) [trunk revision 218514] (Debian
20141209-1) 

COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/5.0.0/cc1plus
-fpreprocessed au.ii -quiet -dumpbase au.ii -mtune=generic -march=x86-64
-auxbase au -version -o /tmp/ccLUie8q.s
GNU C++ (Debian 20141209-1) version 5.0.0 20141209 (experimental) [trunk
revision 218514] (x86_64-linux-gnu)
    compiled by GNU C version 5.0.0 20141209 (experimental) [trunk revision
218514], GMP version 6.0.0, MPFR version 3.1.2-p3, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (Debian 20141209-1) version 5.0.0 20141209 (experimental) [trunk
revision 218514] (x86_64-linux-gnu)
    compiled by GNU C version 5.0.0 20141209 (experimental) [trunk revision
218514], GMP version 6.0.0, MPFR version 3.1.2-p3, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 3d557ab608ce6af8bf7d25d4be684816
au.ii:3:3: error: expected ';' at end of member declaration
   0
   ^
au.ii: In instantiation of 'class A<int>':
au.ii:6:8:   required from here
au.ii:3:3: error: 'A< <template-parameter-1-1> >::<anonymous>' has incomplete
type
au.ii:1:24: note: definition of 'class A<int>' is not complete until the
closing brace
 template <class> class A {
                        ^
au.ii:1:24: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions.


I guess some computers are more ICE-happy than others ;-)

Reply via email to