[gcc r11-4099] [Ada] Inlining nonstatic calls to static expression functions
Pierre-Marie de Rodat
pmderodat@gcc.gnu.org
Tue Oct 20 07:24:20 GMT 2020
https://gcc.gnu.org/g:6af3576f431fa716c3a88197355cf1f5ee682ae2
commit r11-4099-g6af3576f431fa716c3a88197355cf1f5ee682ae2
Author: Gary Dismukes <dismukes@adacore.com>
Date: Fri Jul 17 18:28:52 2020 -0400
[Ada] Inlining nonstatic calls to static expression functions
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Mark static
expression functions as inlined.
Diff:
---
gcc/ada/sem_ch6.adb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index f314f1bde3f..215c4ada782 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;
More information about the Gcc-cvs
mailing list