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.
-- 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;