[Ada] Spurious accessibility error on allocator in generic instance
Pierre-Marie de Rodat
derodat@adacore.com
Thu Jul 16 09:20:51 GMT 2020
This patch fixes an error in the compiler whereby an allocator for a
limited type may cause spurious accessibility errors due to a
miscalculation of access levels on internally generated temporaries
within the instance.
Tested on x86_64-pc-linux-gnu, committed on trunk
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3190 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200716/7f3d51c5/attachment.bin>
More information about the Gcc-patches
mailing list