From: Ronan Desplanques Date: Mon, 4 Nov 2024 16:57:15 +0000 (+0100) Subject: ada: Tweak test for predefined main unit X-Git-Tag: basepoints/gcc-16~4160 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28a69cb3db4525cb40c224a6beb0f5c4f9a94c57;p=thirdparty%2Fgcc.git 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 --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;