]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Inline if -gnatn in CCG mode even if -O0
authorRichard Kenner <kenner@adacore.com>
Tue, 23 Apr 2024 00:20:16 +0000 (20:20 -0400)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 13 Jun 2024 13:30:29 +0000 (15:30 +0200)
gcc/ada/

* exp_ch6.adb (Expand_Ctrl_Function_Call): Inline if -gnatn in
CCG mode even if -O0.

gcc/ada/exp_ch6.adb

index 005210ce6bda953beb52bfed2c093428a3177b02..2e873c9c908b8dff3fccb54a5f104c69e3fa6b5e 100644 (file)
@@ -5311,10 +5311,11 @@ package body Exp_Ch6 is
          then
             Expand_Inlined_Call (Call_Node, Subp, Orig_Subp);
 
-         --  Back-end inlining either if optimization is enabled or the call is
-         --  required to be inlined.
+         --  Back-end inlining either if optimization is enabled, we're
+         --  generating C, or the call is required to be inlined.
 
          elsif Optimization_Level > 0
+           or else CCG_Mode
            or else Has_Pragma_Inline_Always (Subp)
          then
             Add_Inlined_Body (Subp, Call_Node);