This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/47247] Linker plugin specification makes it difficult to handle COMDATs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]