From c8e89a6de5d926701e0a68dba5ace9f27c33725a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Sun, 2 Feb 2020 19:42:50 +0100 Subject: [PATCH] [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. --- gcc/ada/sem.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.30.2