aboutsummaryrefslogtreecommitdiff
path: root/libiberty/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-10-06 18:29:42 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-10-06 18:29:42 -0400
commit38179091cc37de50c92d821b3670e94943d41bfc (patch)
treebc6ed12ab486e9243fadc7deb1fa88cc3d721bdf /libiberty/testsuite
parentecbeb53b5654ccc6efdbdbdb47ef6e29271bb120 (diff)
downloadgcc-38179091cc37de50c92d821b3670e94943d41bfc.zip
gcc-38179091cc37de50c92d821b3670e94943d41bfc.tar.gz
gcc-38179091cc37de50c92d821b3670e94943d41bfc.tar.bz2
PR c++/37376, other mangling issues
gcc/cp/: PR c++/37376, other mangling issues * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling. (write_member_name): Break out from... (write_expression): ...here. Handle dependent COMPONENT_REF. (write_template_arg): Wrap an argument pack in 'I'/'E'. (write_builtin_type): Update char16/32_t mangling. (write_nested_name, write_prefix): Don't forget template args for typename types. * operators.def: Add ARROW_EXPR, update COMPONENT_REF and EXPR_PACK_EXPANSION. libstdc++-v3/: * config/abi/pre/gnu.ver: Update char16/32_t manglings. include/: * demangle.h (enum demangle_component_type): Add DEMANGLE_COMPONENT_PACK_EXPANSION. libiberty/: * cp-demangle.c (struct d_print_info): Add pack_index. (d_dump): Add DEMANGLE_COMPONENT_PACK_EXPANSION. (d_make_comp): Likewise. DEMANGLE_COMPONENT_ARGLIST and DEMANGLE_COMPONENT_TEMPLATE_ARGLIST can have two null args. (cplus_demangle_builtin_types): Add char16/32_t. (cplus_demangle_type): Recognize them. (d_template_args): Handle empty argument packs. (d_template_arg): Handle argument packs. (d_expression): Handle dependent name. (d_index_template_argument): New fn. (d_lookup_template_argument): New fn. (d_find_pack, d_pack_length): New fn. (d_print_subexpr): Split out... (d_print_comp): ...from here. Use d_*_template_argument. Handle empty arg lists. Support pack expansions. * cp-demangle.h (D_BUILTIN_TYPE_COUNT): Increase to 32. From-SVN: r140916
Diffstat (limited to 'libiberty/testsuite')
-rw-r--r--libiberty/testsuite/demangle-expected32
1 files changed, 18 insertions, 14 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 9358204..d9efbc0 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -3345,7 +3345,7 @@ f<X>
#
--format=gnu-v3 --no-params
_ZngILi42EEvN1AIXplT_Li2EEE1TE
-void operator-<42>(A<(42) + (2)>::T)
+void operator-<42>(A<(42)+(2)>::T)
operator-<42>
#
--format=gnu-v3 --no-params
@@ -3385,7 +3385,7 @@ int* const volatile restrict _far
#
--format=gnu-v3 --no-params
_Z3fooILi2EEvRAplT_Li1E_i
-void foo<2>(int (&) [(2) + (1)])
+void foo<2>(int (&) [(2)+(1)])
foo<2>
#
--format=gnu-v3 --no-params
@@ -3612,13 +3612,13 @@ hairyfunc5
# This is from gcc PR 8861
--format=gnu-v3 --no-params
_Z1fILi1ELc120EEv1AIXplT_cviLd810000000000000000703DAD7A370C5EEE
-void f<1, (char)120>(A<(1) + ((int)((double)[810000000000000000703DAD7A370C5]))>)
+void f<1, (char)120>(A<(1)+((int)((double)[810000000000000000703DAD7A370C5]))>)
f<1, (char)120>
#
# This is also from gcc PR 8861
--format=gnu-v3 --no-params
_Z1fILi1EEv1AIXplT_cvingLf3f800000EEE
-void f<1>(A<(1) + ((int)(-((float)[3f800000])))>)
+void f<1>(A<(1)+((int)(-((float)[3f800000])))>)
f<1>
#
# This is from a libstdc++ debug mode patch.
@@ -3643,7 +3643,7 @@ f
# confusion with the '>' which ends the template parameters.
--format=gnu-v3 --no-params
_Z4dep9ILi3EEvP3fooIXgtT_Li2EEE
-void dep9<3>(foo<((3) > (2))>*)
+void dep9<3>(foo<((3)>(2))>*)
dep9<3>
#
# Watch out for templated version of `operator<'--it needs an extra
@@ -3885,16 +3885,20 @@ java resource java/util/iso4217.properties
# decltype/param placeholder test
--format=gnu-v3
_Z3addIidEDTplsTT_sTT0_ES0_S1_
-decltype ((int) + (double)) add<int, double>(int, double)
-# decltype/T() test
---format=gnu-v3
-_Z4add2IidEDTplcvT_vcvT0_vES0_S1_
-decltype (((int)()) + ((double)())) add2<int, double>(int, double)
+decltype ((int)+(double)) add<int, double>(int, double)
# decltype/fn call test
--format=gnu-v3
_Z4add3IidEDTclL_Z1gEsTT_sTT0_EES0_S1_
-decltype (g (int, double)) add3<int, double>(int, double)
-# Extended floating point types test
+decltype (g(int, double)) add3<int, double>(int, double)
+# new (2008) built in types test
+--format=gnu-v3
+_Z1fDfDdDeDhDsDi
+f(decimal32, decimal64, decimal128, half, char16_t, char32_t)
+# pack expansion test
+--format=gnu-v3
+_Z1fIIPiPfPdEEvDpT_
+void f<int*, float*, double*>(int*, float*, double*)
+# '.' test
--format=gnu-v3
-_Z1fDfDdDeDh
-f(decimal32, decimal64, decimal128, half)
+_Z1hI1AIiEdEDTcldtsTT_1gIT0_EEES2_S3_
+decltype (((A<int>).(g<double>))()) h<A<int>, double>(A<int>, double)