From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31105 invoked by alias); 3 Nov 2012 19:15:01 -0000 Received: (qmail 30790 invoked by uid 55); 3 Nov 2012 19:14:42 -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 19:15: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/msg00229.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54791 --- Comment #8 from Adi 2012-11-03 19:14:41 = UTC --- Thank you for your response. (Sorry for the repeated emails. I did it becau= se I got delivery failures on the first 4 mails.) So just to be 100% sure on this: If I want to be sure all my constructors a= re called I should not have any of them inlined. Correct ? What about if I have a constructor body/implementation inside a class declaration ? Does the compiler inline that as well? I guess it might. So how do you see this case. Is it not a bug? I mean I am expecting my constructors to be called and they are not. Do you know a easy way to solve this without modifying all my constructors ? (any compiler options perhaps, ..using __attribute__((constructor)) ) ? PS: If I want to send you an attachment in a mail what format should it be ? txt, doc ? I got some delivery failures,... that's why I am asking. ________________________________ From: dje at gcc dot gnu.org To: adivilceanu@yahoo.com=20 Sent: Saturday, November 3, 2012 3:48 PM Subject: [Bug target/54791] AIX-only: Constructors are not called in main program. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D54791 --- Comment #7 from David Edelsohn 2012-11-03 13:4= 8:46 UTC --- The New York area has experienced a major natural disaster. I am located ne= ar NYC. GCC support is provided by volunteers.=C2=A0 Repeatedly resending your= message will not elicit a faster response. AIX uses the XCOFF file format, not ELF. The object files do not contain .c= tor or .init sections to define constructors. The GCC collect2 wrapper scans ob= ject files for constructors and creates a function to call them.=C2=A0 If the constructors are inlined, the symbols might not appear when the object files are scanned, preventing them from being included in the list of constructor= s to call.