[Ada] Alignment clause ignored on completion derived from private type
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 27 Jan 2020 11:50:23 +0000 (12:50 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 4 Jun 2020 09:11:14 +0000 (05:11 -0400)
commita3fbeceef46546fd47ed370474feed347c86713f
tree3015c5813fab3c0ec7c43afc94c210421a8aa4c2
parente5e53c73a0cf2e326bbfdacbe94e4a3bb79cd219
[Ada] Alignment clause ignored on completion derived from private type

2020-06-04  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_attr.adb (xpand_N_Attribute_Reference) <Input>: Call
Find_Inherited_TSS to look up the Stream_Read TSS.
<Output>: Likewise for the Stream_Write TSS.
* exp_ch7.adb (Make_Final_Call): Call Underlying_Type on
private types to account for underlying full views.
* exp_strm.ads  (Build_Record_Or_Elementary_Input_Function):
Remove Use_Underlying parameter.
* exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
Likewise and adjust accordingly.
* exp_tss.adb (Find_Inherited_TSS): Deal with full views.
Call Find_Inherited_TSS recursively on the parent type if
the base type is a derived type.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Take
into account underlying full views for derived types.
* sem_ch3.adb (Copy_And_Build): Look up the underlying full
view only for a completion.  Be prepared for private types.
(Build_Derived_Private_Type): Build an underlying full view
for a completion in the general case too.
gcc/ada/exp_attr.adb
gcc/ada/exp_ch7.adb
gcc/ada/exp_strm.adb
gcc/ada/exp_strm.ads
gcc/ada/exp_tss.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch3.adb