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

            Bug ID: 26941
           Summary: section / global name conflict: error in backend:
                    symbol 'xxx' is already defined
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: unassignedb...@nondot.org
          Reporter: eugeni.stepa...@gmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

$ cat 1.c
int xxx;
__attribute__((section("xxx"))) int f() { return xxx; }

$ ./bin/clang 1.c -c
fatal error: error in backend: symbol 'xxx' is already defined


I'm not sure what to make of it.
It should be possible to use the same name for a symbol and a section, right?
What about internal symbols? (i.e. "static int xxx;" fails with the same
error).

If not, this is a case of missing diagnostic in Clang.

GCC behavior is to override the section symbol with the global.

-- 
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