[Ada] Disable Initialize_Scalars on runtime files
authorArnaud Charlet <charlet@adacore.com>
Mon, 8 Jun 2020 08:10:29 +0000 (10:10 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 16 Jul 2020 09:18:01 +0000 (05:18 -0400)
gcc/ada/

* frontend.adb: Disable Initialize_Scalars on runtime files.

gcc/ada/frontend.adb

index 0fd3424..b194741 100644 (file)
@@ -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