[llvm-gcc] Using __asm__ to rename symbols is broken on OS/X #1002
Labels
bugzilla
Issues migrated from bugzilla
compile-fail
Use [accepts-invalid] and [rejects-valid] instead
llvm-tools
All llvm tools that do not have corresponding tag
Extended Description
LLVM miscompiles this:
void foo() asm("_foo2");
void bar() {
foo();
}
"_" (aka USER_LABEL_PREFIX in GCC target header files) should only be added to user symbols, not to
asm's. Because of this, the "foo" function should really reference "_foo2", not "__foo2".
The right way to do this is to remove the "_" prefixification from the darwin asm printer, and make the
CFE add USER_LABEL_PREFIX to user labels (duh), but not asm labels.
-Chris
The text was updated successfully, but these errors were encountered: