c++/913: ice in poplevel_class, at cp/decl.c:1682

schmid@snake.iap.physik.tu-darmstadt.de schmid@snake.iap.physik.tu-darmstadt.de
Mon Nov 27 22:56:00 GMT 2000


>Number:         913
>Category:       c++
>Synopsis:       ice in poplevel_class, at cp/decl.c:1682
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 27 22:56:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        2.97 20001120 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.0-test10 #20 Thu Nov 2 03:02:57 CET 2000 i686 unknown
Architecture: i686
GNU assembler 001002
GLIBC 2.1.3
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
gcc version 2.97 20001120 (experimental)
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
>Description:
The following buggy code crashes the compiler with an internal
compiler error. 


>How-To-Repeat:
source file: tb.C

class A
{
public:
  A(B *b);
};


A::A(B *b)
{
  C *c = new C(this);      
  connect(this, SIGNAL(f(const C &)), this, SLOT(g(const C &)));
  emit f(); 
}  

int A::g()
{} 

int main()
{} 

--
g++ -v -Q tb.C -save-temps 
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/specs
Configured with: ../gcc-20001120/configure -enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-libstdcxx-v3
gcc version 2.97 20001120 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUC_MINOR__=97 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tb.C tb.ii
GNU CPP version 2.97 20001120 (experimental) (cpplib) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/include
 /usr/local/i686-pc-linux-gnu/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.97/cc1plus -fpreprocessed tb.ii -lang-c++ -D__GNUG__=2 -D__GXX_ABI_VERSION=100 -dumpbase tb.C -version -fnew-abi -o tb.s
GNU C++ version 2.97 20001120 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.97 20001120 (experimental).
options passed:  -fpreprocessed -lang-c++ -D__GNUG__=2
 -D__GXX_ABI_VERSION=100 -fnew-abi
options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
 -fpcc-struct-return -fsched-interblock -fsched-spec -fbranch-count-reg
 -fexceptions -fnew-exceptions -fcommon -fgnu-linker -fargument-alias
 -fident -fmath-errno -m80387 -mhard-float -mno-soft-float -mieee-fp
 -mfp-ret-in-387
tb.C:4: parse error before '*' token
tb.C:8: parse error before '*' token
tb.C:11: invalid use of `this' at top level
tb.C:11: parse error before '&' token
tb.C:11: ISO C++ forbids declaration of `connect' with no type
 int connect(...)
tb.C:12: syntax error before '(' token

tb.C:16: no `int A::g()' member function declared in class `A'
 int A::g() int A::g() int main()
tb.C:19: Internal error #354.

tb.C:19: Internal compiler error in poplevel_class, at cp/decl.c:1682
confused by earlier errors, bailing out
__
preprocessor source: tb.ii

# 1 "tb.C"
class A
{
public:
  A(B *b);
};


A::A(B *b)
{
  C *c = new C(this);
  connect(this, SIGNAL(f(const C &)), this, SLOT(g(const C &)));
  emit f();
}

int A::g()
{}

int main()
{}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list