From f01ea0c6743451b2188dacd75ed0eeec7b4c63fe Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 6 Jan 1997 08:35:03 -0500 Subject: [PATCH] (type_attribute): Ignore any subtype for now. From-SVN: r13386 --- gcc/dwarfout.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index c4e4ccc4d63..ffba2a3c33a 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));