Bug 42670 - demangler doesn't completely demangle a global constructor symbol
Summary: demangler doesn't completely demangle a global constructor symbol
Status: REOPENED
Alias: None
Product: gcc
Classification: Unclassified
Component: demangler (show other bugs)
Version: 4.4.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-09 10:04 UTC by Debian GCC Maintainers
Modified: 2016-12-18 22:35 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-01-09 18:43:39


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2010-01-09 10:04:45 UTC
[forwarded from http://bugs.debian.org/561150]

$ echo _GLOBAL__I__Z10convertKeyPKc | c++filt
global constructors keyed to _Z10convertKeyPKc
$ echo _GLOBAL__I__Z10convertKeyPKc | c++filt | c++filt
global constructors keyed to convertKey(char const*)
Comment 1 Paolo Carlini 2010-01-09 10:19:04 UTC
c++filt is part of binutils and indeed the PR is about binutils, thus doesn't belong here. If you have strong reasons to believe GCC is at fault, please explain and reopen.
Comment 2 H.J. Lu 2010-01-09 16:23:07 UTC
libiberty/testsuite/demangle-expected has

---
--format=gnu-v3 --no-params
_GLOBAL__I__Z2fnv
global constructors keyed to _Z2fnv
global constructors keyed to _Z2fnv
---

Shouldn't it be

global constructors keyed to fn()

Comment 3 Ian Lance Taylor 2010-01-09 18:16:16 UTC
c++filt is part of the binutils, but it just runs the demangler which is part of gcc.  Any change here will be a change to the demangler.
Comment 4 H.J. Lu 2010-01-09 18:43:39 UTC
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00446.html
Comment 5 Paolo Carlini 2010-01-09 19:07:23 UTC
Oops, sorry, I stand corrected, needed some sleep... indeed, that reminds me... other/42230 !! ;)
Comment 6 hjl@gcc.gnu.org 2010-11-16 17:56:56 UTC
Author: hjl
Date: Tue Nov 16 17:56:50 2010
New Revision: 166810

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166810
Log:
Properly demangle a global constructor symbol.

2010-11-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/42670
	PR binutils/11137
	* cp-demangle.c (d_make_demangle_mangled_name): New.
	(d_demangle_callback): Use it on DCT_GLOBAL_XTORS.

	* testsuite/demangle-expected: Updated.

Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c
    trunk/libiberty/testsuite/demangle-expected
Comment 7 H.J. Lu 2010-11-16 17:58:57 UTC
Fixed.
Comment 8 H.J. Lu 2010-11-16 21:13:09 UTC
A regression:

FAIL: abi/demangle/regression/cw-13.cc execution test

Proposed fix:

http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01725.html
Comment 9 hjl@gcc.gnu.org 2010-11-18 13:24:05 UTC
Author: hjl
Date: Thu Nov 18 13:24:00 2010
New Revision: 166903

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166903
Log:
Update expected demangler output.

2010-11-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR other/42670
	* testsuite/abi/demangle/regression/cw-13.cc: Updated.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/testsuite/abi/demangle/regression/cw-13.cc
Comment 10 Jakub Jelinek 2011-03-25 19:53:11 UTC
GCC 4.6.0 is being released, adjusting target milestone.