public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2104] [Ada] Tune discovery of No_Elaboration_Code restriction
@ 2021-07-07 16:24 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-07 16:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f8776eeb3613b557cea367f01d7d1b6b2fe9d33b

commit r12-2104-gf8776eeb3613b557cea367f01d7d1b6b2fe9d33b
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Tue May 18 00:55:27 2021 +0200

    [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:
---
 gcc/ada/lib-writ.adb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
index 1b02b1cd558..3564f0f84a9 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-07 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 16:24 [gcc r12-2104] [Ada] Tune discovery of No_Elaboration_Code restriction Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).