From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27195 invoked by alias); 8 May 2012 13:45:06 -0000 Received: (qmail 27086 invoked by uid 22791); 8 May 2012 13:45:02 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 May 2012 13:44:34 +0000 From: "vincenzo.innocente at cern dot ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/53282] New: lto and visibility-inlines-hidden makes "wrongly" hidden symbols and in a way that depends on the order of the input compilation units Date: Tue, 08 May 2012 13:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: vincenzo.innocente at cern dot ch 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: 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-05/txt/msg00887.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53282 Bug #: 53282 Summary: lto and visibility-inlines-hidden makes "wrongly" hidden symbols and in a way that depends on the order of the input compilation units Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: lto AssignedTo: unassigned@gcc.gnu.org ReportedBy: vincenzo.innocente@cern.ch Target: x86_64-unknown-linux-gnu Build: gcc-4_7-branch revision 187276 Created attachment 27345 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D27345 directory containing three (very similar) real-life file after pre-compiler step in the following example (not much reduced from a real-life code) a symbol, very similar to others, is made hidden for no good reason. Apparently it also depends on the order of the input files=E2=80=A6 bzip2 -d ltobug3.tar.bz2=20 tar -xf ltobug3.tar=20 cd ltobug3/ c++ -fvisibility-inlines-hidden -O2 -flto -shared -fPIC -o bha.so d1.cc d2.= cc d3.cc ; nm -C bha.so | grep "makeKey" | grep -v "type" 0000000000004290 t _ZN3edm10eventsetup15heterocontainer7makeKeyI11DummyRecordNS0_19EventSetupR= ecordKeyEEET0_v.local.77.4195 0000000000004750 W edm::eventsetup::EventSetupRecordKey edm::eventsetup::heterocontainer::makeKey() 00000000000048a0 W edm::eventsetup::EventSetupRecordKey edm::eventsetup::heterocontainer::makeKey() c++ -fvisibility-inlines-hidden -O2 -flto -shared -fPIC -o bha.so d2.cc d1.= cc d3.cc ; nm -C bha.so | grep "makeKey" | grep -v "type" 00000000000048a0 W edm::eventsetup::EventSetupRecordKey edm::eventsetup::heterocontainer::makeKey() 0000000000004750 W edm::eventsetup::EventSetupRecordKey edm::eventsetup::heterocontainer::makeKey() 00000000000049f0 W edm::eventsetup::EventSetupRecordKey edm::eventsetup::heterocontainer::makeKey()