diff options
author | Jason Merrill <jason@redhat.com> | 2022-03-26 20:10:19 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-03-28 09:35:58 -0400 |
commit | 71e1db540c01a13b01fae054c92878a79252b471 (patch) | |
tree | 0e815254322a394d0b9745ec8f2e2704aab34aa6 /gcc/cp/mangle.cc | |
parent | 07be8f8da4c6840a1fd6b2229b147e50cc6f03dc (diff) | |
download | gcc-71e1db540c01a13b01fae054c92878a79252b471.zip gcc-71e1db540c01a13b01fae054c92878a79252b471.tar.gz gcc-71e1db540c01a13b01fae054c92878a79252b471.tar.bz2 |
c++: mangling union{1} in template [PR104847]
My implementation of union non-type template arguments in r11-2016 broke
braced casts of union type, because they are still in syntactic (undigested)
form.
PR c++/104847
gcc/cp/ChangeLog:
* mangle.cc (write_expression): Don't write a union designator when
undigested.
gcc/testsuite/ChangeLog:
* g++.dg/abi/mangle-union1.C: New test.
Diffstat (limited to 'gcc/cp/mangle.cc')
-rw-r--r-- | gcc/cp/mangle.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/mangle.cc b/gcc/cp/mangle.cc index dbcec0a..eb53e0e 100644 --- a/gcc/cp/mangle.cc +++ b/gcc/cp/mangle.cc @@ -3363,7 +3363,7 @@ write_expression (tree expr) { if (i > last_nonzero) break; - if (TREE_CODE (etype) == UNION_TYPE) + if (!undigested && TREE_CODE (etype) == UNION_TYPE) { /* Express the active member as a designator. */ write_string ("di"); |