summaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-08-22 10:27:46 +0000
commitf733cf303bcdc952c92b81dd62199a40a1f555ec (patch)
tree0a9a9e0f28aa7c7f5bc4d1d1d0e9647163cac4f7 /gcc/ada/gcc-interface/decl.c
parente0e4357b88efe5dc53e50d341a09de4d02331200 (diff)
downloadgcc-tarball-gcc-6.2.0.tar.gz
gcc-6.2.0gcc-6.2.0
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 87026e742b..6f2b0bbfd2 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -966,6 +966,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& !call_is_atomic_load (inner))
|| TREE_CODE (inner) == ADDR_EXPR
|| TREE_CODE (inner) == NULL_EXPR
+ || TREE_CODE (inner) == PLUS_EXPR
|| TREE_CODE (inner) == CONSTRUCTOR
|| CONSTANT_CLASS_P (inner)
/* We need to detect the case where a temporary is created to
@@ -2321,10 +2322,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnat_name = Packed_Array_Impl_Type (gnat_entity);
else
gnat_name = gnat_entity;
- if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
- gnu_entity_name = create_concat_name (gnat_name, "XUP");
- create_type_decl (gnu_entity_name, gnu_fat_type, artificial_p,
- debug_info_p, gnat_entity);
+ tree xup_name
+ = (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ ? get_entity_name (gnat_name)
+ : create_concat_name (gnat_name, "XUP");
+ create_type_decl (xup_name, gnu_fat_type, artificial_p, debug_info_p,
+ gnat_entity);
/* Create the type to be designated by thin pointers: a record type for
the array and its template. We used to shift the fields to have the
@@ -2334,11 +2337,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
Note that GDB can handle standard DWARF information for them, so we
don't have to name them as a GNAT encoding, except if specifically
asked to. */
- if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL)
- gnu_entity_name = create_concat_name (gnat_name, "XUT");
- else
- gnu_entity_name = get_entity_name (gnat_name);
- tem = build_unc_object_type (gnu_template_type, tem, gnu_entity_name,
+ tree xut_name
+ = (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL)
+ ? get_entity_name (gnat_name)
+ : create_concat_name (gnat_name, "XUT");
+ tem = build_unc_object_type (gnu_template_type, tem, xut_name,
debug_info_p);
SET_TYPE_UNCONSTRAINED_ARRAY (tem, gnu_type);