[llvm-bugs] [Bug 43312] New: Terrible error message when section name matches variable name
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 13 12:43:55 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43312
Bug ID: 43312
Summary: Terrible error message when section name matches
variable name
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: efriedma at quicinc.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Testcase:
__attribute((section("foo"))) int foo = 3;
Produces: fatal error: error in backend: invalid symbol redefinition
There are a few issues here:
1. The error message from the backend gives no indication of what's actually
happening. We should be able to at least provide the name of the symbol.
2. clang should be able to provide a nicer error message, with source
locations, along the lines of err_duplicate_mangled_name.
(I think it might actually be possible to compile this, in theory, but it
doesn't work with gcc, so probably not worth spending any effort on that.)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190913/6d696fb7/attachment.html>
More information about the llvm-bugs
mailing list