aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGary Dismukes <dismukes@adacore.com>2020-07-17 18:28:52 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-10-20 03:21:40 -0400
commit6af3576f431fa716c3a88197355cf1f5ee682ae2 (patch)
treeb5a31ac033d7af00f5bc0af090c85de92880247f /gcc
parentb03a25ff5a173bac72b54198af40b2a3594431fc (diff)
downloadgcc-6af3576f431fa716c3a88197355cf1f5ee682ae2.zip
gcc-6af3576f431fa716c3a88197355cf1f5ee682ae2.tar.gz
gcc-6af3576f431fa716c3a88197355cf1f5ee682ae2.tar.bz2
[Ada] Inlining nonstatic calls to static expression functions
gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Mark static expression functions as inlined.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/sem_ch6.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index f314f1b..215c4ad 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -609,6 +609,12 @@ package body Sem_Ch6 is
Set_Expression
(Original_Node (Subprogram_Spec (Def_Id)),
New_Copy_Tree (Expr));
+
+ -- Mark static expression functions as inlined, to ensure
+ -- that even calls with nonstatic actuals will be inlined.
+
+ Set_Has_Pragma_Inline (Def_Id);
+ Set_Is_Inlined (Def_Id);
end if;
end if;
end;