g++ endless loop

Dirk Bonekaemper db@rtsffm.com
Mon Feb 5 07:44:00 GMT 2001


Hi bug-team,

A colleague of of mine managed to generate an erronous input file
that threw g++ into an endless loop. I boiled it down to the
following input :

-- begin file -------------------------------------------------------

class A
class B

class C
{
public:
    B *get() {}
};

-- end file ---------------------------------------------------------


Some hard information:

> gcc -v
Reading specs from /opt/gnu/gcc-2.95.2/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)

System is (i686-pc-linux-gnu).

Running 'g++ -c funnyloop.cxx' results in no error output and a
cc1plus process that takes as much cpu time as it can get, until
you kill it with Ctrl-C.

Hope this helps.
Cheers,
	Dirk

PS: I attached the input file.

----
Dirk Bonekamper                                 EMail   db@rtsffm.com
RTS Realtime Systems AG                         Phone   +49 (0) 69 61009 330
Rembrandtstr. 13                                Fax     +49 (0) 69 61009 181
D-60596 Frankfurt (Germany)




More information about the Gcc-bugs mailing list