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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to