diff options
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index cb07771343b..336b14462c2 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -1877,6 +1877,9 @@ package body Checks is if Is_Subscr_Ref then Arr := Prefix (Parnt); Arr_Typ := Get_Actual_Subtype_If_Available (Arr); + if Is_Access_Type (Arr_Typ) then + Arr_Typ := Directly_Designated_Type (Arr_Typ); + end if; end if; if not Do_Range_Check (Expr) then |