diff options
author | Jason Merrill <jason@redhat.com> | 2020-07-04 05:45:01 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-07-10 08:36:50 -0400 |
commit | 6324c52bba490baa17b6001a6d555ff8bef939d6 (patch) | |
tree | 9ecdc93a57d1647235f79b7ae07f94e49f455aa8 /libiberty/testsuite/demangle-expected | |
parent | 50f071d999374b6dd13149a31f505d4457c9de6d (diff) | |
download | gcc-6324c52bba490baa17b6001a6d555ff8bef939d6.zip gcc-6324c52bba490baa17b6001a6d555ff8bef939d6.tar.gz gcc-6324c52bba490baa17b6001a6d555ff8bef939d6.tar.bz2 |
c++: Support non-type template parms of union type.
Another thing newly allowed by P1907R1. The ABI group has discussed
representing unions with designated initializers, and has separately
specified how to represent designators; this patch implements both.
gcc/cp/ChangeLog:
* tree.c (structural_type_p): Allow unions.
* mangle.c (write_expression): Express unions with a designator.
libiberty/ChangeLog:
* cp-demangle.c (cplus_demangle_operators): Add di, dx, dX.
(d_expression_1): Handle di and dX.
(is_designated_init, d_maybe_print_designated_init): New.
(d_print_comp_inner): Use d_maybe_print_designated_init.
* testsuite/demangle-expected: Add designator tests.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/nontype-class-union1.C: New test.
Diffstat (limited to 'libiberty/testsuite/demangle-expected')
-rw-r--r-- | libiberty/testsuite/demangle-expected | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected index d8e5095..2da2784 100644 --- a/libiberty/testsuite/demangle-expected +++ b/libiberty/testsuite/demangle-expected @@ -1456,3 +1456,12 @@ coro1::empty::operator co_await() const _ZNK3FoossERKS_ Foo::operator<=>(Foo const&) const + +_Z1f1AIXtl1Udi1iLi0EEEE +f(A<U{.i=(0)}>) + +_Z1f1AIXtl1Xdi1adi1bdxLi3ELi1EEEE +f(A<X{.a.b[3]=(1)}>) + +_Z1f1AIXtl1Xdi1adi1bdXLi3ELi4ELi1EEEE +f(A<X{.a.b[3 ... 4]=(1)}>) |