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: [email protected]
Reporter: [email protected]
CC: [email protected]
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
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs