Skip to content

[llvm-gcc] Using __asm__ to rename symbols is broken on OS/X #1002

@lattner

Description

@lattner
Bugzilla Link 630
Resolution FIXED
Resolved on Feb 22, 2010 12:50
Version 1.3
OS MacOS X

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

Metadata

Metadata

Assignees

Labels

bugzillaIssues migrated from bugzillacompile-failUse [accepts-invalid] and [rejects-valid] insteadllvm-toolsAll llvm tools that do not have corresponding tag

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions