diff options
author | Jason Merrill <jason@redhat.com> | 2012-01-06 16:39:43 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-01-06 16:39:43 -0500 |
commit | 4b6aaa996e0d8f5abac818315b6f77cb3596db98 (patch) | |
tree | a4fb9016edd51d789295648c2f9d497fc2a85eb3 /libiberty/testsuite | |
parent | 49f2da1a16b6336cbc8f5273a3dc835625fbf23f (diff) | |
download | gcc-4b6aaa996e0d8f5abac818315b6f77cb3596db98.zip gcc-4b6aaa996e0d8f5abac818315b6f77cb3596db98.tar.gz gcc-4b6aaa996e0d8f5abac818315b6f77cb3596db98.tar.bz2 |
re PR c++/6057 (expression mangling doesn't work for operator new)
PR c++/6057
PR c++/48051
PR c++/50855
PR c++/51322
gcc/cp/
* mangle.c (write_expression): Support NEW_EXPR, DELETE_EXPR,
THROW_EXPR, CONSTRUCTOR, OVERLOAD. Fix PREINCREMENT_EXPR and
PREDECREMENT_EXPR.
(write_template_arg): Fix mangling of class-scope functions and
argument packs.
(mangle_decl): Update suggested -fabi-version argument.
* operators.def: Add DOTSTAR_EXPR, REINTERPRET_CAST_EXPR,
DYNAMIC_CAST_EXPR; correct CONST_CAST_EXPR, STATIC_CAST_EXPR.
* tree.c (dependent_name): No longer static.
* cp-tree.h: Declare it.
* pt.c (unify): Defer handling of unconverted functions.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_INITIALIZER_LIST, DEMANGLE_COMPONENT_NULLARY.
libiberty/
* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_NULLARY and
DEMANGLE_COMPONENT_INITIALIZER_LIST.
(d_make_comp): Likewise. Allow null right arg for
DEMANGLE_COMPONENT_TRINARY_ARG2.
(cplus_demangle_operators): Adjust new/delete; add .*, :: and throw.
(d_template_args, d_template_arg): Handle 'J' for argument packs.
(d_exprlist): Add terminator parm.
(d_expression, d_print_comp): Handle initializer lists, nullary
expressions, prefix/suffix operators, and new.
(d_print_subexpr): Avoid parens around DEMANGLE_COMPONENT_QUAL_NAME
and DEMANGLE_COMPONENT_INITIALIZER_LIST.
* testsuite/demangle-expected: Add tests.
From-SVN: r182970
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r-- | libiberty/testsuite/demangle-expected | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index 642fe14..3f3960a 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -3935,7 +3935,7 @@ _Z1tIlEDTplcvT_Li5EclL_Z1qsELi6EEEv decltype (((long)(5))+(q(6))) t<long>() # test for expansion of function parameter pack --format=gnu-v3 -_Z1gIIidEEDTclL_Z1fEspplfp_Li1EEEDpT_ +_Z1gIJidEEDTclL_Z1fEspplfp_Li1EEEDpT_ decltype (f(({parm#1}+(1))...)) g<int, double>(int, double) # lambda tests --format=gnu-v3 @@ -4030,6 +4030,45 @@ decltype ((int)()) f<int, int>(int, int) --format=gnu-v3 _Z1fDv4_iS_ f(int __vector(4), int __vector(4)) +--format=gnu-v3 +_Z2f1Ii1AEDTdsfp_fp0_ET0_MS2_T_ +decltype ({parm#1}.*{parm#2}) f1<int, A>(A, int A::*) +--format=gnu-v3 +_Z2f2IiEDTquL_Z1bEfp_trET_ +decltype (b?{parm#1} : (throw)) f2<int>(int) +--format=gnu-v3 +_Z6check1IiEvP6helperIXsznw_T_EEE +void check1<int>(helper<sizeof (new int)>*) +--format=gnu-v3 +_Z6check2IiEvP6helperIXszgsnw_T_piEEE +void check2<int>(helper<sizeof (::new int())>*) +--format=gnu-v3 +_Z6check3IiEvP6helperIXsznwadL_Z1iE_T_piLi1EEEE +void check3<int>(helper<sizeof (new (&i) int(1))>*) +--format=gnu-v3 +_Z6check4IiEvP6helperIXszna_A1_T_EEE +void check4<int>(helper<sizeof (new int [1])>*) +--format=gnu-v3 +_Z6check5IiEvP6helperIXszna_A1_T_piEEE +void check5<int>(helper<sizeof (new int [1]())>*) +--format=gnu-v3 +_Z1fIiEDTcmgsdlfp_psfp_EPT_ +decltype ((::delete {parm#1}),(+{parm#1})) f<int>(int*) +--format=gnu-v3 +_Z1fIiEDTcmdafp_psfp_EPT_ +decltype ((delete[] {parm#1}),(+{parm#1})) f<int>(int*) +--format=gnu-v3 +_Z2f1IiEDTppfp_ET_ +decltype ({parm#1}++) f1<int>(int) +--format=gnu-v3 +_Z2f1IiEDTpp_fp_ET_ +decltype (++{parm#1}) f1<int>(int) +--format=gnu-v3 +_Z2f1IiEDTcl1gfp_ilEEET_ +decltype (g({parm#1}, {})) f1<int>(int) +--format=gnu-v3 +_Z2f1IiEDTnw_T_ilEES0_ +decltype (new int{}) f1<int>(int) # # Ada (GNAT) tests. # |