* gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
commita131a6cccebfccd63a7d1759de8e83a9c1459a7b
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 11:47:24 +0000 (14 11:47 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Dec 2017 11:47:24 +0000 (14 11:47 +0000)
treecb51425855d3854723367fc3c5edb23fca63211e
parent683d2c72dedb995aa86bcf3a6c8e4938e5a6aecd
* gcc-interface/gigi.h (pad_type_has_rm_size): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
a padding type for the alignment before validating the size.
Flip conditional construct and add a comment.
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Make sure to
apply the exception for padded objects to the type of the object.
* gcc-interface/utils.c (hash_pad_type): New static function.
(lookup_and_insert_pad_type): Rename into...
(canonicalize_pad_type): ...this.  Call hash_pad_type, do only one
lookup with insertion and always return the canonical type.
(maybe_pad_type): Adjust to above changes.  Set debug type later.
(pad_type_has_rm_size): New predicate.
(set_reverse_storage_order_on_pad_type): Adjust to above changes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255631 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/alignment11.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/alignment12.adb [new file with mode: 0644]