if Is_Generic_Instance (Pack) then
null;
+ -- Do not inline the package if the subprogram is an init proc
+ -- or other internally generated subprogram, because in that
+ -- case the subprogram body appears in the same unit that
+ -- declares the type, and that body is visible to the back end.
+
elsif not Is_Inlined (Pack)
- and then
- (not Has_Completion (E)
- or else Is_Expression_Function (E))
+ and then Comes_From_Source (E)
then
Set_Is_Inlined (Pack);
Inlined_Bodies.Increment_Last;