From: Arnaud Charlet Date: Sun, 2 Feb 2020 18:42:50 +0000 (+0100) Subject: [Ada] Spurious assert failure in Walk_Library_Items X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8e89a6de5d926701e0a68dba5ace9f27c33725a;p=gcc.git [Ada] Spurious assert failure in Walk_Library_Items 2020-06-05 Arnaud Charlet gcc/ada/ * sem.adb (Assert_Done): Relax check for main unit, as it was overzealous in the case of the main unit itself. --- diff --git a/gcc/ada/sem.adb b/gcc/ada/sem.adb index 2c5c54b7712..5a723f34a95 100644 --- a/gcc/ada/sem.adb +++ b/gcc/ada/sem.adb @@ -1842,7 +1842,9 @@ package body Sem is procedure Assert_Done (Withed_Unit : Node_Id) is begin - if not Done (Get_Cunit_Unit_Number (Withed_Unit)) then + if Withed_Unit /= Main_CU + and then not Done (Get_Cunit_Unit_Number (Withed_Unit)) + then if not Nkind_In (Unit (Withed_Unit), N_Generic_Package_Declaration,