This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51726] LTO and attribute 'selectany'
- From: "jacek at codeweavers dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 May 2015 14:45:54 +0000
- Subject: [Bug target/51726] LTO and attribute 'selectany'
- Auto-submitted: auto-generated
- References: <bug-51726-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51726
Jacek Caban <jacek at codeweavers dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jacek at codeweavers dot com
--- Comment #5 from Jacek Caban <jacek at codeweavers dot com> ---
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?