OSDN Git Service

More improvements to sparc VIS vec_init code generation.
[pf3gnuchains/gcc-fork.git] / gcc / ada / inline.adb
index 0eb8dce..609c803 100644 (file)
@@ -341,10 +341,13 @@ package body Inline is
                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;