This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug lto/49286] New: LTO incompatible with PIC and inline asm
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "emil.langrock at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 5 Jun 2011 13:55:03 +0200
- Subject: Re: [Bug lto/49286] New: LTO incompatible with PIC and inline asm
- References: <bug-49286-4@http.gcc.gnu.org/bugzilla/>
The problem is that GCC do not see that evil_long is used by the asm statement.
Static variables are renamed (in order to produce single .s file you can't have
two different statics with the same name) and then the problem is misdiagnozed
as external reference.
Make evil_long as output of the asm. I.e. something like
asm volatile ("mov %%rsp, $1"::"=m"(evil_long));
All variables accessed by asm statements in direct way (that is w/o the constraints)
must be public and decorated with __attribute__ ((externally_visible))
Honza