Message ID | 20171009203752.GA1301@adacore.com |
---|---|
State | New |
Headers | show |
Series | [Ada] Crash on child unit name with -gnatdJ | expand |
Index: sem_util.adb =================================================================== --- sem_util.adb (revision 253559) +++ sem_util.adb (working copy) @@ -23257,7 +23257,16 @@ return "unknown subprogram"; end if; - Append_Entity_Name (Buf, Ent); + if Nkind (Ent) = N_Defining_Program_Unit_Name then + + -- If the subprogram is a child unit, use its simple name to + -- start the construction of the fully qualified name. + + Append_Entity_Name (Buf, Defining_Identifier (Ent)); + + else + Append_Entity_Name (Buf, Ent); + end if; return +Buf; end Subprogram_Name;