summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-22 21:37:20 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-22 21:37:20 +0000
commit5b5abf88e8a72d8085fb9d77b3c42806cee78fd0 (patch)
tree57b94d994167c688cb82c4a1fe633296abed1717 /gcc/tree.c
parent1b6f11e262a982d4891d938f6f8164e5c8187bd1 (diff)
downloadgcc-5b5abf88e8a72d8085fb9d77b3c42806cee78fd0.tar.gz
Fix complex-5.c problem
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29604 138bc75d-0d04-0410-961f-82ee72b054a4
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 81942ce8b0f..ec85e926b6c 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;
}