aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 9de85ef..2412a36 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1859,8 +1859,14 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
TYPE_BIASED_REPRESENTATION_P (gnu_type)
= Has_Biased_Representation (gnat_entity);
- /* Set TYPE_STRING_FLAG for Character and Wide_Character subtypes. */
- TYPE_STRING_FLAG (gnu_type) = TYPE_STRING_FLAG (TREE_TYPE (gnu_type));
+ /* Do the same processing for Character subtypes as for types. */
+ if (TYPE_STRING_FLAG (TREE_TYPE (gnu_type)))
+ {
+ TYPE_NAME (gnu_type) = gnu_entity_name;
+ TYPE_STRING_FLAG (gnu_type) = 1;
+ TYPE_ARTIFICIAL (gnu_type) = artificial_p;
+ finish_character_type (gnu_type);
+ }
/* Inherit our alias set from what we're a subtype of. Subtypes
are not different types and a pointer can designate any instance