diff options
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 4286c0d..cd65caa 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -3138,7 +3138,6 @@ package body Sem_Ch6 is Set_Defining_Unit_Name (Specification (Null_Body), Make_Defining_Identifier (Loc, Chars (Defining_Entity (N)))); - Set_Corresponding_Body (N, Defining_Entity (Null_Body)); Form := First (Parameter_Specifications (Specification (Null_Body))); while Present (Form) loop @@ -3192,7 +3191,13 @@ package body Sem_Ch6 is then Set_Has_Completion (Designator); - if Present (Null_Body) then + -- Null procedures are always inlined, but generic formal subprograms + -- which appear as such in the internal instance of formal packages, + -- need no completion and are not marked Inline. + + if Present (Null_Body) + and then Nkind (N) /= N_Formal_Concrete_Subprogram_Declaration + then Set_Corresponding_Body (N, Defining_Entity (Null_Body)); Set_Body_To_Inline (N, Null_Body); Set_Is_Inlined (Designator); |