diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-12-18 07:14:23 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-12-18 07:14:23 +0000 |
commit | 3a4425fd9a818300be9f87abd13f483c5aef9e54 (patch) | |
tree | cb72eae16db99401628f9c28f8e8b851e9a39c83 /gcc/ada/layout.adb | |
parent | c846eedd56a5ecf28233d5e8fe938d44b3add5f3 (diff) | |
download | gcc-3a4425fd9a818300be9f87abd13f483c5aef9e54.zip gcc-3a4425fd9a818300be9f87abd13f483c5aef9e54.tar.gz gcc-3a4425fd9a818300be9f87abd13f483c5aef9e54.tar.bz2 |
[Ada] Do not propagate Object_Size onto Size for composite types
2019-12-18 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* layout.adb (Layout_Type): In the case of composite types, do
not copy the Esize onto the RM_Size if the latter is not set.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>:
Also cap the alignment if an Object_Size clause has been
specified. Pass VAR_DECL in the call to validate_size for the
Esize of a type.
(validate_size): Be prepared to give an error on an Object_Size
clause.
From-SVN: r279507
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r-- | gcc/ada/layout.adb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb index 4fc502b..ce2fe30 100644 --- a/gcc/ada/layout.adb +++ b/gcc/ada/layout.adb @@ -435,14 +435,6 @@ package body Layout is end; end if; - -- If Esize is set, and RM_Size is not, RM_Size is copied from Esize. - -- At least for now this seems reasonable, and is in any case needed - -- for compatibility with old versions of gigi. - - if Known_Esize (E) and then Unknown_RM_Size (E) then - Set_RM_Size (E, Esize (E)); - end if; - -- For array base types, set the component size if object size of the -- component type is known and is a small power of 2 (8, 16, 32, 64), -- since this is what will always be used, except if a very large |