This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54791] AIX-only: Constructors are not called in main program.
- From: "adivilceanu at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Nov 2012 06:24:03 +0000
- Subject: [Bug target/54791] AIX-only: Constructors are not called in main program.
- Auto-submitted: auto-generated
- References: <bug-54791-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54791
--- Comment #6 from Adi <adivilceanu at yahoo dot com> 2012-11-03 06:24:03 UTC ---
This is the 5thmail I am sending(I got 4 delivery errors because of MIME
attachments).
After more investigation I saw that I managed to get the constructors
called by removing the "inline" keyword from just one constructor of a
class that resides in my master header.
From my -Wl,-debug linker
options I see that this particular constructor name is used to generate
the dynamic initialization in almost every object file.
See debug.txt attached for more details. Look for
"_GLOBAL__I_65535_0__ZN5TraceD2Ev".
Do you know why would that be?ÂÂ
Is this a bug ?
Do you know why on Linux with the same compiler version and same code is not
happening?
I have around 1000 member functions that are declared "inline" across various
classes.
Do you know if there are any know issues with inline and
constructors? Any compiler options I should be
aware of? I am not using any optimization (yet .. I am planning to).
Now
after I did this I am still having some other problems. Some object
seemed are not initialized properly. I am still suspecting the other
inlines might be the culprit.
Any ideas/suggestions would be appreciated.