https://bugs.llvm.org/show_bug.cgi?id=36110

            Bug ID: 36110
           Summary: Erratic behavior with inline asm macros
           Product: clang
           Version: 6.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: roy...@freebsd.org
                CC: llvm-bugs@lists.llvm.org

It seems like clang has some specific behavior when dealing with .macros
defined inside of inline asm. Given the following example:

# cat snip.c
int main(void)
{
    asm ( ".macro FOO\n.endm" );
    asm ( ".macro FOO\n.endm" );
}

# clang -o snip snip.c
# clang -no-integrated-as -o snip snip.c
/tmp/snip-a5a133.s: Assembler messages:
/tmp/snip-a5a133.s:19: Error: Macro `foo' was already defined
clang: error: assembler command failed with exit code 1 (use -v to see
invocation)

Would it be possible to fix clang so it keeps .macro-s defined in other asm()-s
on the same compilation unit? (ie: so that it has the same behavior as gnu as)

Thanks, Roger.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to