aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-01-28 04:48:33 -0800
committerNathan Sidwell <nathan@acm.org>2021-01-28 04:55:02 -0800
commitaf66f4f1b06f5e0c099dfced2fcf7b1b23fa53e7 (patch)
tree438fe5908263fa1ee477d4a322a3e74118bb6364 /gcc/go
parentd61ca09ec9342ec5683a67a50b9bdd3dbdcd3624 (diff)
downloadgcc-af66f4f1b06f5e0c099dfced2fcf7b1b23fa53e7.zip
gcc-af66f4f1b06f5e0c099dfced2fcf7b1b23fa53e7.tar.gz
gcc-af66f4f1b06f5e0c099dfced2fcf7b1b23fa53e7.tar.bz2
c++: header unit template alias merging [PR 98770]
Typedefs are streamed by streaming the underlying type, and then recreating the typedef. But this breaks checking a duplicate is the same as the original when it is a template alias -- we end up checking a template alias (eg __void_t) against the underlying type (void). And those are not the same template alias. This stops pretendig that the underlying type is the typedef for that checking and tells is_matching_decl 'you have a typedef', so it knows what to do. (We do not want to recreate the typedef of the duplicate, because that whole set of nodes is going to go away.) PR c++/98770 gcc/cp/ * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME check order. (trees_in::decl_value): Do typedef frobbing only when installing a new typedef, adjust is_matching_decl call. Swap is_typedef & TYPE_NAME check. (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable names and deal with typedef checking. gcc/testsuite/ * g++.dg/modules/pr98770_a.C: New. * g++.dg/modules/pr98770_b.C: New.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions