[Ada] Spurious accessibility error on allocator in generic instance
authorJustin Squirek <squirek@adacore.com>
Fri, 5 Jun 2020 19:41:33 +0000 (15:41 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 16 Jul 2020 09:18:05 +0000 (05:18 -0400)
commit1a0d29099af1fa1f0dc8aa7c13ec71c7e014cd96
tree92ba419d2288c42101e7bc78b5ba769734ce76b4
parent04292126821fad06d0f13c5faaa46447798dc5a8
[Ada] Spurious accessibility error on allocator in generic instance

gcc/ada/

* exp_ch4.adb (Expand_N_Type_Conversion): Remove flawed test for
whether "statically deeper" accessibility rules apply to a given
target type and instead use the new routine
Statically_Deeper_Relation_Applies.
(Statically_Deeper_Relation_Applies): Created to centralize the
calculation of whether a target type within a conversion must
have static accessibility checks.
* sem_ch13.adb (Check_One_Function): Minor comment revision.
gcc/ada/exp_ch4.adb
gcc/ada/sem_ch13.adb