diff options
| author | Ian Lance Taylor <ian@airs.com> | 2006-08-27 21:42:55 +0000 |
|---|---|---|
| committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2006-08-27 21:42:55 +0000 |
| commit | 022d41663ddcc03460e411e390eeb0ccada393d5 (patch) | |
| tree | a40a9f01db662b18e0ec6a5970063abe955768bc | |
| parent | 99f4234aa713145f873b2295a4d62dd388489e64 (diff) | |
| download | gcc-022d41663ddcc03460e411e390eeb0ccada393d5.zip gcc-022d41663ddcc03460e411e390eeb0ccada393d5.tar.gz gcc-022d41663ddcc03460e411e390eeb0ccada393d5.tar.bz2 | |
re PR other/28797 (Problems with demangling (__cxa_demangle()))
PR other/28797
* cp-demangle.c (d_pointer_to_member_type): Do add a substitution
for a qualified member which is not a function.
* testsuite/demangle-expected: Add test case.
From-SVN: r116493
| -rw-r--r-- | libiberty/ChangeLog | 7 | ||||
| -rw-r--r-- | libiberty/cp-demangle.c | 11 | ||||
| -rw-r--r-- | libiberty/testsuite/demangle-expected | 6 |
3 files changed, 23 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 745a2f4..27280a3 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2006-08-27 Ian Lance Taylor <ian@airs.com> + + PR other/28797 + * cp-demangle.c (d_pointer_to_member_type): Do add a substitution + for a qualified member which is not a function. + * testsuite/demangle-expected: Add test case. + 2006-07-27 Jan Hubicka <jh@suse.cz> PR rtl-optimization/28071 diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 109d533..c7ee878 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -2081,13 +2081,22 @@ d_pointer_to_member_type (struct d_info *di) g++ does not work that way. g++ treats only the CV-qualified member function as a substitution source. FIXME. So to work with g++, we need to pull off the CV-qualifiers here, in order to - avoid calling add_substitution() in cplus_demangle_type(). */ + avoid calling add_substitution() in cplus_demangle_type(). But + for a CV-qualified member which is not a function, g++ does + follow the ABI, so we need to handle that case here by calling + d_add_substitution ourselves. */ pmem = d_cv_qualifiers (di, &mem, 1); if (pmem == NULL) return NULL; *pmem = cplus_demangle_type (di); + if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE) + { + if (! d_add_substitution (di, mem)) + return NULL; + } + return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem); } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index fa2a2fe..4aaa3d6 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3805,3 +3805,9 @@ java::lang::Math::acos(double)double _Z4makeI7FactoryiET_IT0_Ev make<Factory, int>()Factory<int> make<Factory, int> +# +# From PR 28797 +--format=auto --no-params +_Z1fM1AKiPKS1_ +f(int const A::*, int const A::* const*) +f |
