diff options
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index a62d9c2..ff21e7b 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); |