ada: Small tweak to implementation of by-copy semantics for storage models
commitc7b84ce699965738b0f2f2d15039c716255f7588
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 4 Mar 2023 14:02:32 +0000 (4 15:02 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:16 +0000 (25 09:44 +0200)
tree0e2a084e5758b6a7011dccc53c35feef5a6ccfc9
parent78203700fac6e7e39f5a31e892963172263f8239
ada: Small tweak to implementation of by-copy semantics for storage models

Get_Actual_Subtype can be used to access the Actual_Designated_Subtype of
explicit dereferences with a storage model. As a side effect, this also
handles the case where the prefix of the dereference is a formal parameter.

gcc/ada/

* exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Use Get_Actual_Subtype
to retrieve the actual subtype for all actuals and do it in only one
place for all unconstrained composite formal types.
gcc/ada/exp_ch6.adb