From: Piotr Trojanek Date: Mon, 17 May 2021 22:55:27 +0000 (+0200) Subject: [Ada] Tune discovery of No_Elaboration_Code restriction X-Git-Tag: basepoints/gcc-13~6209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8776eeb3613b557cea367f01d7d1b6b2fe9d33b;p=thirdparty%2Fgcc.git [Ada] Tune discovery of No_Elaboration_Code restriction gcc/ada/ * lib-writ.adb (Write_ALI): Exit from loop after seeing first unit that violates No_Elaboration_Code restriction. --- diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb index 1b02b1cd5580..3564f0f84a9a 100644 --- a/gcc/ada/lib-writ.adb +++ b/gcc/ada/lib-writ.adb @@ -1256,6 +1256,7 @@ package body Lib.Writ is if Units.Table (Unit).Generate_Code or else Unit = Main_Unit then if not Has_No_Elaboration_Code (Cunit (Unit)) then Main_Restrictions.Violated (No_Elaboration_Code) := True; + exit; end if; end if; end loop;