aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-07-01 13:37:31 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-01 13:37:31 +0000
commit8b9aa1a98fd194ab8fad3f54e232172fd857f077 (patch)
tree7416926e0f97712934f4cfe673b00b3e2d3b57a8 /gcc
parentf603c9855e36cd7ab706174bddb997b7bb3f2ce2 (diff)
downloadgcc-8b9aa1a98fd194ab8fad3f54e232172fd857f077.zip
gcc-8b9aa1a98fd194ab8fad3f54e232172fd857f077.tar.gz
gcc-8b9aa1a98fd194ab8fad3f54e232172fd857f077.tar.bz2
[Ada] Make No_Inline pragma effective for generic subprograms
2019-07-01 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up handling of Has_Pragma_Inline_Always and deal with Has_Pragma_No_Inline. From-SVN: r272880
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/sem_ch12.adb15
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 38bd1d7..a342b98 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch12.adb (Analyze_Subprogram_Instantiation): Move up
+ handling of Has_Pragma_Inline_Always and deal with
+ Has_Pragma_No_Inline.
+
2019-07-01 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): If the parent type is
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index efbb6cc..0395af9 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -5654,6 +5654,16 @@ package body Sem_Ch12 is
Set_Has_Pragma_Inline (Act_Decl_Id, Has_Pragma_Inline (Gen_Unit));
Set_Has_Pragma_Inline (Anon_Id, Has_Pragma_Inline (Gen_Unit));
+ Set_Has_Pragma_Inline_Always
+ (Act_Decl_Id, Has_Pragma_Inline_Always (Gen_Unit));
+ Set_Has_Pragma_Inline_Always
+ (Anon_Id, Has_Pragma_Inline_Always (Gen_Unit));
+
+ Set_Has_Pragma_No_Inline
+ (Act_Decl_Id, Has_Pragma_No_Inline (Gen_Unit));
+ Set_Has_Pragma_No_Inline
+ (Anon_Id, Has_Pragma_No_Inline (Gen_Unit));
+
-- Propagate No_Return if pragma applied to generic unit. This must
-- be done explicitly because pragma does not appear in generic
-- declaration (unlike the aspect case).
@@ -5663,11 +5673,6 @@ package body Sem_Ch12 is
Set_No_Return (Anon_Id);
end if;
- Set_Has_Pragma_Inline_Always
- (Act_Decl_Id, Has_Pragma_Inline_Always (Gen_Unit));
- Set_Has_Pragma_Inline_Always
- (Anon_Id, Has_Pragma_Inline_Always (Gen_Unit));
-
-- Mark both the instance spec and the anonymous package in case the
-- body is instantiated at a later pass. This preserves the original
-- context in effect for the body.