aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/accessibility.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-08-05 14:43:41 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:12 +0200
commit518f93c17983623107ff2091728c93b02fc0eeb2 (patch)
treea518434eb791c92ee0c02789861f9847bfae7979 /gcc/ada/accessibility.adb
parentf9a68b454743fffe07fb51ed735510c2178ba14c (diff)
downloadgcc-518f93c17983623107ff2091728c93b02fc0eeb2.zip
gcc-518f93c17983623107ff2091728c93b02fc0eeb2.tar.gz
gcc-518f93c17983623107ff2091728c93b02fc0eeb2.tar.bz2
ada: Fix internal error on instantiation with private component type
First, this fixes an internal error on the instantiation of a nested generic package taking an array type whose component type is a private type declared in the parent package as formal type parameter. In the body of the instance, the full view of the private type is visible and must be restored by means of the Check_Generic_Actuals mechanism. Second, this fixes the same internal error in the case where the component type itself is an array type whose component type is a private type declared in the parent package, i.e. when the formal type parameter is an array of array type, by naturally extending the Has_Secondary_Private_View mechanism to the array of array case. gcc/ada/ * sem_ch12.adb (Component_Type_For_Private_View): New function. (Check_Generic_Actuals): For an actual type parameter, also check its component type if it is an array type. (Check_Private_View): Use Component_Type_For_Private_View in the case of an array type. (Instantiate_Type): Likewise. (Save_Global_References.Set_Global_Type): Likewise.
Diffstat (limited to 'gcc/ada/accessibility.adb')
0 files changed, 0 insertions, 0 deletions