diff options
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 55dbc2317b2..138248507d8 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -1788,10 +1788,14 @@ package body Sem_Ch6 is -- the actuals at the point of inlining, i.e. instantiation. To treat -- the formals as globals to the body to inline, we nest it within -- a dummy parameterless subprogram, declared within the real one. + -- To avoid generating an internal name (which is never public, and + -- which affects serial numbers of other generated names), we use + -- an internal symbol that cannot conflict with user declarations. Set_Parameter_Specifications (Specification (Original_Body), No_List); - Set_Defining_Unit_Name (Specification (Original_Body), - Make_Defining_Identifier (Sloc (N), New_Internal_Name ('S'))); + Set_Defining_Unit_Name + (Specification (Original_Body), + Make_Defining_Identifier (Sloc (N), Name_uParent)); Set_Corresponding_Spec (Original_Body, Empty); Body_To_Analyze := Copy_Generic_Node (Original_Body, Empty, False); |