diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-21 21:34:55 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-21 21:34:55 +0000 |
commit | 7522af2a26fd69aeedab8a7a3b16457cf6f424d0 (patch) | |
tree | c3e89f0d4476c3b1986fd1ff01d5f38327a1047e /libiberty | |
parent | 20e18aeb7f28c66570c0cd9e5755c639cc9c7079 (diff) | |
download | ppe42-gcc-7522af2a26fd69aeedab8a7a3b16457cf6f424d0.tar.gz ppe42-gcc-7522af2a26fd69aeedab8a7a3b16457cf6f424d0.zip |
* cp-demangle.c (has_return_type): Skip qualifiers when checking
whether we have a template.
* testsuite/demangle-expected: Add four new tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73819 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 6 | ||||
-rw-r--r-- | libiberty/cp-demangle.c | 5 | ||||
-rw-r--r-- | libiberty/testsuite/demangle-expected | 21 |
3 files changed, 32 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index bb05816af95..cc5699ff0a8 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2003-11-21 Ian Lance Taylor <ian@wasabisystems.com> + + * cp-demangle.c (has_return_type): Skip qualifiers when checking + whether we have a template. + * testsuite/demangle-expected: Add four new tests. + 2003-11-20 Ian Lance Taylor <ian@wasabisystems.com> * testsuite/demangle-expected: Minor changes to match output of diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 6a2b311335c..e4425195783 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -908,6 +908,11 @@ has_return_type (dc) return 0; case D_COMP_TEMPLATE: return ! is_ctor_dtor_or_conversion (d_left (dc)); + case D_COMP_RESTRICT: + case D_COMP_VOLATILE: + case D_COMP_CONST: + case D_COMP_VENDOR_TYPE_QUAL: + return has_return_type (d_left (dc)); } } diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index ca8b85858f0..c73ea305f99 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -2858,6 +2858,27 @@ global constructors keyed to _Z2fnv --format=gnu-v3 _Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_ r(int (G::*)(), int (G::*)() const, G, int (H::*)(), int (G::*)(), what<G const>, what2<G const>, int (G::*)() const) +# +# This is from the gdb testsuite gdb.cp/cplusfuncs.exp. +--format=gnu-v3 +_Z10hairyfunc5PFPFilEPcE +hairyfunc5(int (*(*)(char*))(long)) +# +# This is from gcc PR 8861 +--format=gnu-v3 +_Z1fILi1ELc120EEv1AIXplT_cviLd810000000000000000703DAD7A370C5EEE +void f<1, 120>(A<(1) + (((int)((double)810000000000000000703DAD7A370C5)))>) +# +# This is also from gcc PR 8861 +--format=gnu-v3 +_Z1fILi1EEv1AIXplT_cvingLf3f800000EEE +void f<1>(A<(1) + (((int)(-((float)3f800000))))>) +# +# This is from a libstdc++ debug mode patch. +--format=gnu-v3 +_ZNK11__gnu_debug16_Error_formatter14_M_format_wordImEEvPciPKcT_ +void __gnu_debug::_Error_formatter::_M_format_word<unsigned long>(char*, int, char const*, unsigned long) const +# # # This caused an infinite loop. # We still don't demangle this correctly, but at least we don't hang. |