aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@cygnus.com>1999-09-22 21:37:20 +0000
committerMichael Meissner <meissner@gcc.gnu.org>1999-09-22 21:37:20 +0000
commit405f63da1c335254a9f4c27bde94d7be7340524c (patch)
tree57b94d994167c688cb82c4a1fe633296abed1717 /gcc/tree.c
parentf9bd8d8e45377edd96155bc38295f483c67a973a (diff)
downloadgcc-405f63da1c335254a9f4c27bde94d7be7340524c.zip
gcc-405f63da1c335254a9f4c27bde94d7be7340524c.tar.gz
gcc-405f63da1c335254a9f4c27bde94d7be7340524c.tar.bz2
Fix complex-5.c problem
From-SVN: r29604
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 81942ce..ec85e92 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4449,6 +4449,40 @@ build_complex_type (component_type)
if (TYPE_SIZE (t) == 0)
layout_type (t);
+ /* If we are writing Dwarf2 output we need to create a name,
+ since complex is a fundamental type. */
+ if (write_symbols == DWARF2_DEBUG && ! TYPE_NAME (t))
+ {
+ char *name;
+ if (component_type == char_type_node)
+ name = "complex char";
+ else if (component_type == signed_char_type_node)
+ name = "complex signed char";
+ else if (component_type == unsigned_char_type_node)
+ name = "complex unsigned char";
+ else if (component_type == short_integer_type_node)
+ name = "complex short int";
+ else if (component_type == short_unsigned_type_node)
+ name = "complex short unsigned int";
+ else if (component_type == integer_type_node)
+ name = "complex int";
+ else if (component_type == unsigned_type_node)
+ name = "complex unsigned int";
+ else if (component_type == long_integer_type_node)
+ name = "complex long int";
+ else if (component_type == long_unsigned_type_node)
+ name = "complex long unsigned int";
+ else if (component_type == long_long_integer_type_node)
+ name = "complex long long int";
+ else if (component_type == long_long_unsigned_type_node)
+ name = "complex long long unsigned int";
+ else
+ name = (char *)0;
+
+ if (name)
+ TYPE_NAME (t) = get_identifier (name);
+ }
+
return t;
}