aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@adacore.com>2024-04-22 20:20:16 -0400
committerMarc Poulhiès <poulhies@adacore.com>2024-06-13 15:30:29 +0200
commit01f8250bc88c154c3996621b577adbfca073a382 (patch)
treecd9c933a598c82304ba701deef41764d97603aa9
parent916a0f026e1516de4608b308cd7e4b68b8e562bb (diff)
downloadgcc-01f8250bc88c154c3996621b577adbfca073a382.zip
gcc-01f8250bc88c154c3996621b577adbfca073a382.tar.gz
gcc-01f8250bc88c154c3996621b577adbfca073a382.tar.bz2
ada: Inline if -gnatn in CCG mode even if -O0
gcc/ada/ * exp_ch6.adb (Expand_Ctrl_Function_Call): Inline if -gnatn in CCG mode even if -O0.
-rw-r--r--gcc/ada/exp_ch6.adb5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 005210c..2e873c9 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -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);