[Ada] Fix for atomic wrongly rejected on object of discriminated type
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 28 Sep 2021 16:26:38 +0000 (18:26 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 11 Oct 2021 13:38:13 +0000 (13:38 +0000)
commit5ea133c6ce09fbeeec91457a38689cdac7c05d91
tree6db0f0702ea1a0371a6647b3aa3f8f3cbcbe33e6
parent92961bdf2dfc63965a05302aac6c907065bd2c27
[Ada] Fix for atomic wrongly rejected on object of discriminated type

gcc/ada/

* gcc-interface/decl.c (promote_object_alignment): Add GNU_SIZE
parameter and use it for the size of the object if not null.
(gnat_to_gnu_entity) <E_Variable>: Perform the automatic alignment
promotion for objects whose nominal subtype is of variable size.
(gnat_to_gnu_field): Adjust call to promote_object_alignment.
gcc/ada/gcc-interface/decl.c