summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-16 18:01:04 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2016-02-16 18:01:04 +0000
commitffc23920dedfc229cf545b53467ba162023e8d71 (patch)
tree93b6a383eac0e03e24cd25a24772e2cd7d38691d /gcc/ada/gcc-interface/utils.c
parent88ff21ff95928267017fca5d02b6734a739139e7 (diff)
* gcc-interface/gigi.h (maybe_debug_type): New inline function.
* gcc-interface/misc.c (gnat_get_array_descr_info): Use it. Call maybe_character_value on the array bounds. Get to the base type of the index type and call maybe_debug_type on it. * gcc-interface/utils.c (finish_character_type): Add special treatment git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233469 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index a62d9c240731..ff21e7b5ff05 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1625,8 +1625,11 @@ finish_character_type (tree char_type)
if (TYPE_UNSIGNED (char_type))
return;
- /* Make a copy of the unsigned version since we'll modify it below. */
- tree unsigned_char_type = copy_type (gnat_unsigned_type_for (char_type));
+ /* Make a copy of a generic unsigned version since we'll modify it. */
+ tree unsigned_char_type
+ = (char_type == char_type_node
+ ? unsigned_char_type_node
+ : copy_type (gnat_unsigned_type_for (char_type)));
TYPE_NAME (unsigned_char_type) = TYPE_NAME (char_type);
TYPE_STRING_FLAG (unsigned_char_type) = TYPE_STRING_FLAG (char_type);