public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug lto/47934] New: LTO: function with attribute "used" is not emitted
@ 2011-03-01 6:45 d.g.gorbachev at gmail dot com
2011-03-01 6:47 ` [Bug lto/47934] " pinskia at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-03-01 6:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47934
Summary: LTO: function with attribute "used" is not emitted
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: d.g.gorbachev@gmail.com
============= bug.c =============
static void __attribute__((used))
foo(void)
{
}
int main(void)
{
__asm__("call foo");
return 0;
}
=================================
$ gcc -flto bug.c
/tmp/ccCtTmmT.ltrans0.ltrans.o: In function `main':
ccCtTmmT.ltrans0.o:(.text+0x4): undefined reference to `foo'
collect2: ld returned 1 exit status
>From GCC documentation:
`used'
This attribute, attached to a function, means that code must be
emitted for the function even if it appears that the function is
not referenced. This is useful, for example, when the function is
referenced only in inline assembly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/47934] LTO: function with attribute "used" is not emitted 2011-03-01 6:45 [Bug lto/47934] New: LTO: function with attribute "used" is not emitted d.g.gorbachev at gmail dot com @ 2011-03-01 6:47 ` pinskia at gcc dot gnu.org 2011-03-01 6:58 ` [Bug lto/47934] LTO: function with attribute "used" is emitted under the "wrong" name d.g.gorbachev at gmail dot com 2011-03-01 10:21 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2011-03-01 6:47 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47934 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-01 06:47:23 UTC --- Actually it is most likely emitted but just the "wrong" name. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/47934] LTO: function with attribute "used" is emitted under the "wrong" name. 2011-03-01 6:45 [Bug lto/47934] New: LTO: function with attribute "used" is not emitted d.g.gorbachev at gmail dot com 2011-03-01 6:47 ` [Bug lto/47934] " pinskia at gcc dot gnu.org @ 2011-03-01 6:58 ` d.g.gorbachev at gmail dot com 2011-03-01 10:21 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: d.g.gorbachev at gmail dot com @ 2011-03-01 6:58 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47934 Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|LTO: function with |LTO: function with |attribute "used" is not |attribute "used" is emitted |emitted |under the "wrong" name. --- Comment #2 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-03-01 06:58:43 UTC --- Indeed, it works with __asm__("call foo.1985.1988"). Changed the summary. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug lto/47934] LTO: function with attribute "used" is emitted under the "wrong" name. 2011-03-01 6:45 [Bug lto/47934] New: LTO: function with attribute "used" is not emitted d.g.gorbachev at gmail dot com 2011-03-01 6:47 ` [Bug lto/47934] " pinskia at gcc dot gnu.org 2011-03-01 6:58 ` [Bug lto/47934] LTO: function with attribute "used" is emitted under the "wrong" name d.g.gorbachev at gmail dot com @ 2011-03-01 10:21 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2011-03-01 10:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47934 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE --- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-01 10:20:47 UTC --- dup *** This bug has been marked as a duplicate of bug 43038 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-01 10:21 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-03-01 6:45 [Bug lto/47934] New: LTO: function with attribute "used" is not emitted d.g.gorbachev at gmail dot com 2011-03-01 6:47 ` [Bug lto/47934] " pinskia at gcc dot gnu.org 2011-03-01 6:58 ` [Bug lto/47934] LTO: function with attribute "used" is emitted under the "wrong" name d.g.gorbachev at gmail dot com 2011-03-01 10:21 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).