Message ID | 20181211113123.GA104901@adacore.com |
---|---|
State | New |
Headers | show |
Series | [Ada] Crash on nesting of subunits with bodies acting as specs | expand |
--- gcc/ada/sem_ch10.adb +++ gcc/ada/sem_ch10.adb @@ -2352,7 +2352,9 @@ package body Sem_Ch10 is Remove_Scope; end if; - if Nkind (Unit (Lib_Spec)) = N_Package_Body then + if Nkind_In + (Unit (Lib_Spec), N_Package_Body, N_Subprogram_Body) + then Remove_Context (Library_Unit (Lib_Spec)); end if; end if;