https://gcc.gnu.org/g:492f9cdf0046ba6d2452f8363d15b4449229b64c
commit r15-5130-g492f9cdf0046ba6d2452f8363d15b4449229b64c Author: squirek <squi...@adacore.com> Date: Mon Oct 21 18:21:13 2024 +0000 ada: The Library_Unit field was used for all sorts of different purposes, which led to confusing code. This patch further refines the previous work to fix several cases. gcc/ada/ChangeLog: * inline.adb (In_Main_Unit_Or_Subunit): Use Other_Comp_Unit instead of Spec_Or_Body_Lib_Unit. (Must_Inline): Use Other_Comp_Unit instead of Spec_Or_Body_Lib_Unit. Diff: --- gcc/ada/inline.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 9fa5642238ef..a133ec7f72b2 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -498,7 +498,7 @@ package body Inline is -- package of the subprogram to find more calls to be inlined. if Comp = Cunit (Main_Unit) - or else Comp = Spec_Or_Body_Lib_Unit (Cunit (Main_Unit)) + or else Comp = Other_Comp_Unit (Cunit (Main_Unit)) then Add_Call (E); return Inline_Package; @@ -4716,7 +4716,7 @@ package body Inline is end loop; return Comp = Cunit (Main_Unit) - or else Comp = Spec_Or_Body_Lib_Unit (Cunit (Main_Unit)); + or else Comp = Other_Comp_Unit (Cunit (Main_Unit)); end In_Main_Unit_Or_Subunit; ----------------