diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-03-07 17:12:28 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-03-07 17:12:28 +0000 |
commit | 7f42aa36f6956dd769a4c0fdf9f1c0febc8d7831 (patch) | |
tree | 8d0fe99a264529cc0340614521097f351fd79b53 /gcc/ada/utils.c | |
parent | efc05e3c551eb5b6d14511350c6b68bb50432803 (diff) | |
download | gcc-7f42aa36f6956dd769a4c0fdf9f1c0febc8d7831.zip gcc-7f42aa36f6956dd769a4c0fdf9f1c0febc8d7831.tar.gz gcc-7f42aa36f6956dd769a4c0fdf9f1c0febc8d7831.tar.bz2 |
decl.c (MAX_FIXED_MODE_SIZE): Define if not already defined.
* decl.c (MAX_FIXED_MODE_SIZE): Define if not already defined.
(gnat_to_gnu_entity) <E_Record_Type>: Try to get a smaller form of
the component for packing, if possible, as well as if a component
size clause is specified.
<E_Record_Subtype>: For an array type used to implement a packed
array, get the component type from the original array type.
Try to get a smaller form of the component for packing, if possible,
as well as if a component size clause is specified.
(round_up_to_align): New function.
(make_packable_type): Add in_record parameter.
For a padding record, preserve the size. If not in_record and the
size is too large for an integral mode, attempt to shrink the size
by lowering the alignment.
Ditch the padding bits of the last component.
Compute sizes and mode manually, and propagate the RM size.
Return a BLKmode record type if its size has shrunk.
(maybe_pad_type): Use MAX_FIXED_MODE_SIZE instead of BIGGEST_ALIGNMENT.
Use Original_Array_Type to retrieve the type in case of an error.
Adjust call to make_packable_type.
(gnat_to_gnu_field): Likewise.
(concat_id_with_name): Minor tweak.
* trans.c (larger_record_type_p): New predicate.
(call_to_gnu): Compute the nominal type of the object only if the
parameter is by-reference. Do the conversion actual type -> nominal
type if the nominal type is a larger record.
(gnat_to_gnu): Do not require integral modes on the source type to
avoid the conversion for types with identical names.
(addressable_p): Add gnu_type parameter. If it is specified, do not
return true if the expression is not addressable in gnu_type.
Adjust recursive calls.
* utils.c (finish_record_type): Remove dead code.
From-SVN: r133011
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 32cbbff..bdce72a 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -750,7 +750,6 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, tree name = TYPE_NAME (record_type); tree ada_size = bitsize_zero_node; tree size = bitsize_zero_node; - bool var_size = false; bool had_size = TYPE_SIZE (record_type) != 0; bool had_size_unit = TYPE_SIZE_UNIT (record_type) != 0; tree field; @@ -811,15 +810,6 @@ finish_record_type (tree record_type, tree fieldlist, int rep_level, tree this_size = DECL_SIZE (field); tree this_ada_size = DECL_SIZE (field); - /* We need to make an XVE/XVU record if any field has variable size, - whether or not the record does. For example, if we have a union, - it may be that all fields, rounded up to the alignment, have the - same size, in which case we'll use that size. But the debug - output routines (except Dwarf2) won't be able to output the fields, - so we need to make the special record. */ - if (TREE_CODE (this_size) != INTEGER_CST) - var_size = true; - if ((TREE_CODE (type) == RECORD_TYPE || TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == QUAL_UNION_TYPE) && !TYPE_IS_FAT_POINTER_P (type) |