https://llvm.org/bugs/show_bug.cgi?id=25910
Bug ID: 25910 Summary: clang allows two var definitions with the same mangled name Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: andreybokha...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified clang allows two var definitions with the same mangled name; only one var is emitted: $ cat test.cpp extern "C" { int _ZN2nm3abcE = 1; } namespace nm { float abc = 2; } float foo() { return _ZN2nm3abcE + nm::abc; } $ clang -emit-llvm -S -c test.cpp [no errors printed] $ cat test.ll ... @_ZN2nm3abcE = global float 2.000000e+00, align 4 [int _ZN2nm3abcE definition is nowhere to be found] Yours, Andrey ================= Software Engineer Intel Compiler Team Intel -- 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