From: Ronan Desplanques <desplanq...@adacore.com>

This change is part of an effort to reduce usage of
Is_Predefined_Filename.

gcc/ada/ChangeLog:

        * frontend.adb (Frontend): tweak test for predefined main unit.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/frontend.adb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb
index ea0c7b12b4a..bb7a332986c 100644
--- a/gcc/ada/frontend.adb
+++ b/gcc/ada/frontend.adb
@@ -380,9 +380,7 @@ begin
       --  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
+      if Initialize_Scalars and then Is_Predefined_Unit (Main_Unit) then
          Initialize_Scalars   := False;
          Init_Or_Norm_Scalars := Normalize_Scalars;
       end if;
-- 
2.43.0

Reply via email to