http://llvm.org/bugs/show_bug.cgi?id=9407
Summary: inline asm is not updated on renames.
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Linker
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Chatting with Jan Hubicka he pointed out an interesting case we don't get
right. I have not seen this in real code yet, but it would be interesting to
fix it for completeness.
$ cat c1.c
#include <stdio.h>
static void __attribute__((used)) foo(void) {
printf("zed\n");
}
asm(".text\n .globl _zed\n _zed: jmp _foo");
void bar(void);
void zed(void);
int main(void) {
bar();
zed();
}
$ cat c2.c
#include <stdio.h>
static void __attribute__((used)) foo(void) {
printf("bar\n");
}
asm(".text\n .globl _bar\n _bar: jmp _foo");
$ clang -emit-llvm -c -Os c1.c
$ clang -emit-llvm -c -Os c2.c
$ clang c1.o c2. -o t
$ ./t
zed
zed
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs