ICE in cp/decl.c:9165 with broken templates

Alain Miniussi aminiussi@crosswinds.net
Tue Oct 10 23:52:00 GMT 2000


I got this ICE with a recent snapshot (1 week), and with the 
online compiler available at CodeSourcery 5 mn ago.

Note that the source is completly broken :-)

Alain

----------------------------------------------------------------
[alain@kashmir ch7]$ more truc.cpp

template< typename SID, class SDR >
void k( SID sid, SDR* p, void (SDR::*)( typename SID::T ) );

struct E { };
struct S { void f( int ); };

void f() { k( E(), (S*)0, &S::f ); }

[alain@kashmir ch7]$ g++ -c -v truc.cpp
Reading specs from
/home/alain/gcc-last-snap/lib/gcc-lib/i686-pc-linux-gnu/2.97/
specs
gcc version 2.97 20001002 (experimental)
 /home/alain/gcc-last-snap/lib/gcc-lib/i686-pc-linux-gnu/2.97/cpp0
-lang-c++ -D_
                                                                                          
?-Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux
-Asystem(posi
x) -D__STDC_HOSTED__=1 -Acpu(i386) -Amachine(i386) -Di386 -D__i386
-D__i386__ -D
__tune_i686__ -D__tune_pentiumpro__ truc.cpp /tmp/ccjCh2l7.ii
GNU CPP version 2.97 20001002 (experimental) (cpplib) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /home/alain/gcc-last-snap/include/g++-v3
 /usr/local/include
 /home/alain/gcc-last-snap/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
 /home/alain/gcc-last-snap/i686-pc-linux-gnu/include
 /usr/include
End of search list.
 /home/alain/gcc-last-snap/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1plus
-lang-c++
/tmp/ccjCh2l7.ii -quiet -dumpbase truc.cpp -version -o /tmp/cc07fNk5.s
GNU C++ version 2.97 20001002 (experimental) (i686-pc-linux-gnu)
compiled by GNU
 C version 2.97 20001002 (experimental).
truc.cpp: In function `void f()':
truc.cpp:8: Tree check: expected class 't', have 'x' (error_mark)
truc.cpp:8: Internal compiler error in , at ../gcc/gcc/cp/decl.c:9165
   Please submit a full bug report.
   See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.
[alain@kashmir ch7]$


More information about the Gcc-bugs mailing list