From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20468 invoked by alias); 15 Jan 2003 10:26:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20413 invoked by uid 71); 15 Jan 2003 10:26:02 -0000 Resent-Date: 15 Jan 2003 10:26:02 -0000 Resent-Message-ID: <20030115102602.20412.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, lecroart@nevrax.com Received: (qmail 16633 invoked by uid 61); 15 Jan 2003 10:16:00 -0000 Message-Id: <20030115101600.16626.qmail@sources.redhat.com> Date: Wed, 15 Jan 2003 10:26:00 -0000 From: lecroart@nevrax.com Reply-To: lecroart@nevrax.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9321: ctor not call in lib if a .cpp file doesn't have function called by the executable X-SW-Source: 2003-01/txt/msg00935.txt.bz2 List-Id: >Number: 9321 >Category: c++ >Synopsis: ctor not call in lib if a .cpp file doesn't have function called by the executable >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Jan 15 02:26:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: gcc >Release: gcc (GCC) 3.2.1 >Organization: >Environment: Linux linuxdev01 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686 unknown unknown GNU/Linux >Description: I create a lib that contains some .cpp. One .cpp in the lib contains only a ctor that should register into an array. If I launch the executable, the ctor is not called (not registered). If now, I call, in the main, a function of the .cpp, now the ctor is called. The behavior semms to be: If there s a .cpp without any function call in a lib, then ctor are not called. >How-To-Repeat: tar zxvf staticclass.tgz ./go ./a.out look that only 2 string are registered (bug) emacs main.cpp uncomment the test_function(); ./go ./a.out look that the 3 string are registered (ok) >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-gzip-compressed; name="staticclass.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="staticclass.tgz" H4sIAOiuIj4AA+1Za2/bNhT1V/NXXDgpKsWPSLZkAU46IEuTLFuyAnEGBOiCQqYom50ehkQ1TYv8 913Slix7CbwOjtNtOkAg6ZK8pEme+0oqXMEpDdw03a89EwzDMhzbxqdhOrZZfuaoGU7fNOyu07N6 NcPs9XtGDeznWlAZWSrcBKBG40ww3Ian+q1r/5ciLZ1/6PKoQ6fTTc9hmIbRt6wnz9/qdxfn38V+ pt21+zUwNr2Qx/A/P3+ywyMaZB6Dw1R4PO5MfiALWSPgo30aep1JY0UoWCqklJwfx2HoRh7I23Me 4W5GlGkN+dXQDwjhkVBNoOnkKwHY3wfuw32cQeBmEZ2AmDBgnxlgFzHhKaTiPmAtJW7IWRpwx4MA oljAiEHCxjwVLGHekq6EhfEnpgZF7LMAOltUa0nF0vCOGi9bP/i4DsHjSMP1AuQ/aDDweDqdyRIm siQC44A8kJc+sc2izP9x/DxzSP470sY/Zf/tXs7/vu1gP9MyLbvi/zZAPUA6k9D9gxF873QIbTYh 9wTQvsBWaAdoA/5jF7+CQpn/0q4/xxzfFP/1bMn/nuNU8d82sHr+l2gIfB6wTc6xJv4ze1YR/1mm Ke1/3+galf3fBo5vbqDAG0DjT64uoSxKQmj75PLol5OSUPkLgoNPL47OhjMZQHsM7SmfMmi/M8jF 26JNttbRiaAj+YJ/ISHXR1dnJ9fDev2NdD8ywnQJcYNgUK/Xd7V5q07Iux9/HmIf2SEGFXPGhOQj BrCryQ46qeMRJoWmQkx2NgmyA0fgszsYuSmn4DHfzQIBSRawFGQEjKFuwiPZpmQ4PQzxcgmIfR9G 94ARatJOuMejsYpUcw2jjAfeXM8dFxOIswTiu2ihMCWd4W+np+c3J8NB6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