aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarfout.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-01-06 08:35:03 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-01-06 08:35:03 -0500
commitf01ea0c6743451b2188dacd75ed0eeec7b4c63fe (patch)
tree66eb441b444c78a2f68c215b02a78b4e47499a14 /gcc/dwarfout.c
parentc7cfe938ebe954ded2ecbef9ba151c459fc8dbbc (diff)
downloadgcc-f01ea0c6743451b2188dacd75ed0eeec7b4c63fe.zip
gcc-f01ea0c6743451b2188dacd75ed0eeec7b4c63fe.tar.gz
gcc-f01ea0c6743451b2188dacd75ed0eeec7b4c63fe.tar.bz2
(type_attribute): Ignore any subtype for now.
From-SVN: r13386
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r--gcc/dwarfout.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index c4e4ccc..ffba2a3 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -1,5 +1,5 @@
/* Output Dwarf format symbol table information from the GNU C compiler.
- Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com) of Network Computing Devices.
This file is part of GNU CC.
@@ -3002,16 +3002,22 @@ type_attribute (type, decl_const, decl_volatile)
register enum tree_code code = TREE_CODE (type);
register int root_type_modified;
- if (TREE_CODE (type) == ERROR_MARK)
+ if (code == ERROR_MARK)
return;
/* Handle a special case. For functions whose return type is void,
we generate *no* type attribute. (Note that no object may have
type `void', so this only applies to function return types. */
- if (TREE_CODE (type) == VOID_TYPE)
+ if (code == VOID_TYPE)
return;
+ /* If this is a subtype, find the underlying type. Eventually,
+ this should write out the appropriate subtype info. */
+ while ((code == INTEGER_TYPE || code == REAL_TYPE)
+ && TREE_TYPE (type) != 0)
+ type = TREE_TYPE (type), code = TREE_CODE (type);
+
root_type_modified = (code == POINTER_TYPE || code == REFERENCE_TYPE
|| decl_const || decl_volatile
|| TYPE_READONLY (type) || TYPE_VOLATILE (type));