From: Viljar Indus <in...@adacore.com> In Ada 2005 even if the formal is using a tagged limited type then the type should not be considered incomplete.
gcc/ada/ChangeLog: * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Exchange_Limited_Views also in Ada 2005. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch6.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 2f09284ebda..ab12f22ad51 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -4536,8 +4536,10 @@ package body Sem_Ch6 is -- may now appear in parameter and result profiles. Since the analysis -- of a subprogram body may use the parameter and result profile of the -- spec, swap any limited views with their non-limited counterpart. + -- + -- Note that the non-limited view should also be exchanged in Ada 2005. - if Ada_Version >= Ada_2012 and then Present (Spec_Id) then + if Ada_Version >= Ada_2005 and then Present (Spec_Id) then Exch_Views := Exchange_Limited_Views (Spec_Id); end if; -- 2.43.0