[LLVMbugs] [Bug 20734] New: failing to mangle string literals in class definitions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 22 13:12:14 PDT 2014


            Bug ID: 20734
           Summary: failing to mangle string literals in class definitions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Suppose we have this in two different TUs:

  struct X {
    static constexpr const char *p = "foo";
  static const char *q = X::p;

The two different 'q's must have the same value, because they are reading from
the same global. We fail to provide this, because we do not provide a mangled
name for the string literal.

The Itanium ABI appears to not assign a mangling in this case, but presumably
we should use _ZZ1XEs.

GCC and EDG get this wrong too (EDG even gets it wrong within a single TU).

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/20140822/e98ddd97/attachment.html>

More information about the llvm-bugs mailing list