Hi,

Are there known bugs in GCC related to multiple instantiations of a linked
list in C++ code?

I have a short C++ program in which I instantiate a linked list (defined as
a class).  It always compiles without incident.  When I edit the code to
instantiate one (small, simple) linked list, the program runs fine; when I
edit the code to instantiate two such objects, the program still runs fine.
However, when the code instantiates three or more more such objects, it seg
faults and core dumps at the first attempt to access any of these objects.
I've traced the problem as far as I can and it's clear that memory addresses
are conflicting between the objects.  Again, two objects work fine.

I've seen this problem in both a 2.7.x version and a 2.9.x version of the
compiler.  My code compiled and ran fine on an HP-UX which I no longer have
access to.  I'd be happy to forward the code, but I'm not sure if this email
address is valid anymore; I found it in the GCC-HOWTO (1996) in the LDP.

Please advise!  Thank you,

Casey

Reply via email to