From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14099 invoked by alias); 3 Nov 2012 06:24:21 -0000 Received: (qmail 13975 invoked by uid 55); 3 Nov 2012 06:24:04 -0000 From: "adivilceanu at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54791] AIX-only: Constructors are not called in main program. Date: Sat, 03 Nov 2012 06:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: adivilceanu at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00198.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54791 --- Comment #6 from Adi 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=20 called by removing the "inline" keyword from just one constructor of a=20 class that resides in my master header. =46rom 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?=C2=A0=C2=A0=20 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 vario= us 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).=20 Now after I did this I am still having some other problems. Some object=20 seemed are not initialized properly.=C2=A0 I am still suspecting the other= =20 inlines might be the culprit. Any ideas/suggestions would be appreciated.