https://gcc.gnu.org/g:28a69cb3db4525cb40c224a6beb0f5c4f9a94c57

commit r15-5393-g28a69cb3db4525cb40c224a6beb0f5c4f9a94c57
Author: Ronan Desplanques <desplanq...@adacore.com>
Date:   Mon Nov 4 17:57:15 2024 +0100

    ada: Tweak test for predefined main unit
    
    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.

Diff:
---
 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 ea0c7b12b4a0..bb7a332986c8 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;

Reply via email to