When rewriting N_Subprogram_Instantiation into wrapper packages we must move
the original aspect specifications to the wrapper packages, as otherwise they
will be only accessible via Original_Node. This is similar to how we move
aspect specifications for expression functions and many other constructs.
gcc/ada/ChangeLog:
* sem_ch12.adb (Analyze_Subprogram_Instantiation): Move aspects when
instantiating subprogram as a library unit.
elsif Nkind (Parent (N)) = N_Compilation_Unit then
Rewrite (N, Unit (Parent (N)));
+ Move_Aspects (From => Original_Node (N), To => N);
Set_Unit (Parent (N), N);
end if;
elsif Nkind (Parent (N)) = N_Compilation_Unit then
Rewrite (N, Unit (Parent (N)));
+ Move_Aspects (From => Original_Node (N), To => N);
Set_Unit (Parent (N), N);
end if;