aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-02-23 07:08:55 -0800
committerNathan Sidwell <nathan@acm.org>2021-02-23 07:18:03 -0800
commit47145e6916f58e1cd4f562c06fa7289da49f690c (patch)
treed79a8b9622e100e16cace7a97ffe8c4e437fd695 /gcc/fortran/resolve.c
parent3f8384545784696fbd66aaec24a998a819e912c5 (diff)
downloadgcc-47145e6916f58e1cd4f562c06fa7289da49f690c.zip
gcc-47145e6916f58e1cd4f562c06fa7289da49f690c.tar.gz
gcc-47145e6916f58e1cd4f562c06fa7289da49f690c.tar.bz2
c++: typedef for linkage [PR 99208]
Unnamed types with a typedef name for linkage were always troublesome in modules. This is the underlying cause of that trouble -- we were creating incorrect type structures. Classes have an implicit self-reference, and we created that for unnamed classes too. It turns out we make use of this member, so just not generating it turned into a rathole. This member is created using the anonymous name -- because we've not yet met the typedef name. When we retrofit the typedef name we were checking identifier matching and changing all type variants with that identifier. Which meant we ended up with a strange typedef for the self reference. This fixes things to check for DECL identity of the variants, so we don't smash the self-reference -- that continues to have the anonymous name. PR c++/99208 gcc/cp/ * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER identity. gcc/testsuite/ * g++.dg/modules/pr99208_a.C: New. * g++.dg/modules/pr99208_b.C: New.
Diffstat (limited to 'gcc/fortran/resolve.c')
0 files changed, 0 insertions, 0 deletions