[gcc(refs/users/wschmidt/heads/builtins3)] [Ada] Disable Initialize_Scalars on runtime files

William Schmidt wschmidt@gcc.gnu.org
Tue Aug 18 17:53:15 GMT 2020


https://gcc.gnu.org/g:4211ccbbaed452f0363cf257b98f3236f442bfca

commit 4211ccbbaed452f0363cf257b98f3236f442bfca
Author: Arnaud Charlet <charlet@adacore.com>
Date:   Mon Jun 8 10:10:29 2020 +0200

    [Ada] Disable Initialize_Scalars on runtime files
    
    gcc/ada/
    
            * frontend.adb: Disable Initialize_Scalars on runtime files.

Diff:
---
 gcc/ada/frontend.adb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index 0fd3424b38b..b1947411264 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -382,6 +382,16 @@ begin
          Warn_On_Non_Local_Exception := True;
       end if;
 
+      --  Disable Initialize_Scalars for runtime files to avoid circular
+      --  dependencies.
+
+      if Initialize_Scalars
+        and then Fname.Is_Predefined_File_Name (File_Name (Main_Source_File))
+      then
+         Initialize_Scalars   := False;
+         Init_Or_Norm_Scalars := Normalize_Scalars;
+      end if;
+
       --  Now on to the semantics. Skip if in syntax only mode
 
       if Operating_Mode /= Check_Syntax then


More information about the Gcc-cvs mailing list