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
Fixed, testcase here: Regression/CFrontend/2005-09-24-AsmUserPrefix.c Patches here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050919/028324.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050919/028325.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050919/028326.html -Chris