This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/78040] New: Missed mangled names of class methods in the translation unit dump


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78040

            Bug ID: 78040
           Summary: Missed mangled names of class methods in the
                    translation unit dump
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrei.moscow at mail dot ru
  Target Milestone: ---

The mangled names of class methods are missed in the translation unit (TU) dump
for a C++ header when using latest GCC 6.2.

All is OK (mangled names are present in the TU dump) when using GCC 4.9.4 or
GCC 5.4.

This feature is very important for maintaining backward binary compatibility of
Linux libraries. Please help.

How to reproduce:

1. Take a header file:

class TestClass
{
public:
    int testMethod(int testParam);
};

int testFunc();

2. Compile it by GCC 5.4 with -fdump-translation-unit additional option:

./GCC-5.4/bin/g++ -fdump-translation-unit test.h

3. Check mangled names (GCC 5.4):

cat test.h.001t.tu |grep "testMethod\|testFunc\|TestClass"
@5      identifier_node  strg: testFunc lngt: 8       
@11     identifier_node  strg: TestClass               lngt: 9       
@33     identifier_node  strg: testMethod              lngt: 10      
@34     identifier_node  strg: _ZN9TestClass10testMethodEi

4. Compile it by GCC 6.2 with -fdump-translation-unit additional option:

./GCC-6.2/bin/g++ -fdump-translation-unit test.h

5. Check mangled names (GCC 6.2):

cat test.h.001t.tu |grep "testMethod\|testFunc\|TestClass"
@5      identifier_node  strg: testFunc lngt: 8       
@11     identifier_node  strg: TestClass               lngt: 9       
@33     identifier_node  strg: testMethod              lngt: 10

The mangled name "ZN9TestClass10testMethodEi" is missed when using GCC 6.2.

Thank you.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]