It is computed from the Etype of N_Target_Name nodes.
gcc/ada/
* sem_ch5.adb (Analyze_Target_Name): Call Analyze_Dimension on the
node once the Etype is set.
* sem_dim.adb (OK_For_Dimension): Set to True for N_Target_Name.
(Analyze_Dimension): Call Analyze_Dimension_Has_Etype for it.
if Current = Expression (Context) then
pragma Assert (Context = Current_Assignment);
Set_Etype (N, Etype (Name (Current_Assignment)));
+ Analyze_Dimension (N);
else
Report_Error;
end if;
N_Real_Literal => True,
N_Selected_Component => True,
N_Slice => True,
+ N_Target_Name => True,
N_Type_Conversion => True,
N_Unchecked_Type_Conversion => True,
| N_Qualified_Expression
| N_Selected_Component
| N_Slice
+ | N_Target_Name
| N_Unchecked_Type_Conversion
=>
Analyze_Dimension_Has_Etype (N);