aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-16 06:58:43 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-16 06:58:43 +0000
commit169afcb99f761eddccf83acad755c50d997247c8 (patch)
tree662fccb4b15738e06e8970052669564113a2ab07 /gcc/ada/gcc-interface/decl.c
parent1f24872b632a4bfab84e21ec2ffac269a33478a7 (diff)
downloadgcc-169afcb99f761eddccf83acad755c50d997247c8.zip
gcc-169afcb99f761eddccf83acad755c50d997247c8.tar.gz
gcc-169afcb99f761eddccf83acad755c50d997247c8.tar.bz2
decl.c (make_type_from_size): Just copy TYPE_NAME.
* gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy TYPE_NAME. * gcc-interface/trans.c (smaller_packable_type_p): Rename into... (smaller_form_type_p): ...this. Change parameter and variable names. (call_to_gnu): Use the nominal type of the parameter to create the temporary if it's a smaller form of the actual type. (addressable_p): Return false if the actual type is integral and its size is greater than that of the expected type. From-SVN: r158398
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 9ca27fd..44c3929 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -7748,14 +7748,9 @@ make_type_from_size (tree type, tree size_tree, bool for_biased)
SET_TYPE_RM_MAX_VALUE (new_type,
convert (TREE_TYPE (new_type),
TYPE_MAX_VALUE (type)));
- /* Propagate the name to avoid creating a fake subrange type. */
- if (TYPE_NAME (type))
- {
- if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL)
- TYPE_NAME (new_type) = DECL_NAME (TYPE_NAME (type));
- else
- TYPE_NAME (new_type) = TYPE_NAME (type);
- }
+ /* Copy the name to show that it's essentially the same type and
+ not a subrange type. */
+ TYPE_NAME (new_type) = TYPE_NAME (type);
TYPE_BIASED_REPRESENTATION_P (new_type) = biased_p;
SET_TYPE_RM_SIZE (new_type, bitsize_int (size));
return new_type;