This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/47247] Linker plugin specification makes it difficult to handle COMDATs
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Jan 2011 17:00:26 +0000
- Subject: [Bug lto/47247] Linker plugin specification makes it difficult to handle COMDATs
- Auto-submitted: auto-generated
- References: <bug-47247-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.10 17:00:06
Ever Confirmed|0 |1
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-10 17:00:06 UTC ---
Testcase to demonstrate the problem
jh@evans:~> cat t2.C
#include <stdlib.h>
extern int unused2;
extern int unused (void);
class test
{
public:
virtual int unused3()
{
return (int)(size_t)&unused;
}
};
extern inline int unused (void)
{
test t;
if (t.unused3())
return unused2;
}
main()
{
}
jh@evans:~> /abuild/jh/trunk-install/bin/g++ -O2 t2.C -rdynamic
jh@evans:~> /abuild/jh/trunk-install/bin/g++ -O2 t2.C -rdynamic -flto
/abuild/jh/trunk-install/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin/ld:
/tmp/ccvAd49o.ltrans0.ltrans.o: in function
unused():ccvAd49o.ltrans0.o(.text._Z6unusedv+0xc): error: undefined reference
to 'unused2'
collect2: ld returned 1 exit status