[llvm-bugs] [Bug 33177] New: Clang emits incorrect mangled name

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 26 03:53:27 PDT 2017


            Bug ID: 33177
           Summary: Clang emits incorrect mangled name
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tberghammer at google.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

clang version 5.0.0 (trunk 303332) (llvm/trunk 303340)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /mnt/ssd/ll/git/build/host-release/bin

Take the following source code:
class aaaaa {
class bbbbb : aaaaa {
  using aaaaa::aaaaa;
void ccccc() { bbbbb(1); }

Compile it with: clang++ -std=c++11 file.cpp -c
Run: objdump -t file.o

Notice that clang produced the following mangled name: _ZN5bbbbbCI25aaaaaEi

I think we tried to either mangle "aaaaa::aaaaa(int)" imported into bbbbb or
"bbbbb::bbbbb(int)" but the result seems to be wrong. As far as I can tell it
is syntactically invalid as the 'C' should be followed by a number to specify
the constructor while CI2 is an invalid sequence.

Note: Compiling the same code with 3.5.0 or with gcc 4.8.4 mangles supposedly
the same function as _ZN5bbbbbC2Ei what seems to be much more reasonable.

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/20170526/a6c1b191/attachment.html>

More information about the llvm-bugs mailing list