This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-1.0.3 bug w/ inline constructors

Hi there!

I'm running egcs 1.0.3 (it reports gcc version egcs-2.90.29 980515
(egcs-1.0.3 release))
on RedHat5.1 Linux. I came across the following problem when using
inline constructors:

- Spuriously the linker will complain about missing constructors;
however these are inline
such that the linker should not see them at all.

- More seriously, the compiler seems to generate bogus code sometimes. I
have quite
a complex project, where there is a class A derived from class B; now B
originally had
an inline constructor that was included in the constructor call list of
A's constructor.
When dynamically creating an instance of A, the memory mangement gets
and the program crashes; if B's constructor is made non-inline
everything works ok.
Stepping into A's constructor also showed that when using the inline
version of B::B()
the members that B::B() sets to zero contained random data.

If it can help you, I might send you the preprocessed file and the
assembler output of the
respective source with inline and non-inline versions.


Olaf Lenzmann

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]