From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 33160 invoked by alias); 21 May 2015 14:46:08 -0000 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 Received: (qmail 32995 invoked by uid 48); 21 May 2015 14:45:55 -0000 From: "jacek at codeweavers dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/51726] LTO and attribute 'selectany' Date: Thu, 21 May 2015 14:46: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-Version: 4.6.3 X-Bugzilla-Keywords: lto, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jacek at codeweavers dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01805.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51726 Jacek Caban changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek at codeweavers dot com --- Comment #5 from Jacek Caban --- It seems like selectany is not supported at all in LTO: $ cat selectany.c __attribute__((selectany)) int i = 0; $ i686-w64-mingw32-gcc selectany.c selectany.c -flto -shared /tmp/cchTGZVt.o (symbol from plugin):(.text+0x0): multiple definition of `i' /tmp/ccAy2OzL.o (symbol from plugin):(.text+0x0): first defined here collect2: error: ld returned 1 exit status $ i686-w64-mingw32-gcc --version i686-w64-mingw32-gcc (GCC) 5.1.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Should I file separated bug?