aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-04-04 20:28:11 +0000
committerRichard Stallman <rms@gnu.org>1993-04-04 20:28:11 +0000
commit0591b9c6285d23a61461b2add592b054b5e84d01 (patch)
tree616cd79741c3467ede8b3567c5d82a6b41c8bd84
parentfff9ecff94a0142ddb4b888d4a85d757c0c2eab4 (diff)
downloadgcc-0591b9c6285d23a61461b2add592b054b5e84d01.zip
gcc-0591b9c6285d23a61461b2add592b054b5e84d01.tar.gz
gcc-0591b9c6285d23a61461b2add592b054b5e84d01.tar.bz2
(type_attribute): Use the TYPE_MAIN_VARIANT of the
given type when calling `user_def_type_attribute'. From-SVN: r4005
-rw-r--r--gcc/dwarfout.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index b70a467..b2552a6 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -2827,7 +2827,16 @@ type_attribute (type, decl_const, decl_volatile)
if (root_type_modified)
mod_u_d_type_attribute (type, decl_const, decl_volatile);
else
- user_def_type_attribute (type);
+ /* We have to get the TYPE_MAIN_VARIANT here (and pass that to the
+ `user_def_type_attribute' routine) because the ..._TYPE node we
+ have might simply be a *copy* of some original type node (where
+ the copy was created to help us keep track of typedef names)
+ and that copy might have a different TYPE_UID from the original
+ ..._TYPE node. (Note that when `equate_type_number_to_die_number'
+ is labeling a given type DIE for future reference, it always and
+ only creates labels for DIEs representing *main variants*, and it
+ never even knows about non-main-variants.) */
+ user_def_type_attribute (TYPE_MAIN_VARIANT (type));
}
/* Given a tree pointer to a struct, class, union, or enum type node, return