When checking restriction No_Relative_Delay and detecting calls to
Ada.Real_Time.Timing_Events.Set_Handler with a Time_Span parameter,
we looked at the exact type of the actual parameter, while we should
look at its base type.
This patch looks at the type of actual parameter like it is done in
Expand_N_Delay_Until_Statement.
gcc/ada/ChangeLog:
* sem_res.adb (Resolve_Call): Look at the base type of actual parameter
when checking call to Set_Handler.
if Restriction_Check_Required (No_Relative_Delay)
and then Is_RTE (Nam, RE_Set_Handler)
- and then Is_RTE (Etype (Next_Actual (First_Actual (N))), RE_Time_Span)
+ and then
+ Is_RTE
+ (Base_Type (Etype (Next_Actual (First_Actual (N)))), RE_Time_Span)
then
Check_Restriction (No_Relative_Delay, N);
end if;