aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEd Schonberg <schonber@gnat.com>2004-10-04 16:57:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-10-04 16:57:56 +0200
commitc71c53a8554e4bab6e4c375319f1af5d8584b88a (patch)
tree5967ad580b6b278f38c7fea4a2f49131b82ffe2e /gcc/ada
parent71d9e9f213d295971b7cb339ee18513bcbf45e2d (diff)
downloadgcc-c71c53a8554e4bab6e4c375319f1af5d8584b88a.zip
gcc-c71c53a8554e4bab6e4c375319f1af5d8584b88a.tar.gz
gcc-c71c53a8554e4bab6e4c375319f1af5d8584b88a.tar.bz2
sem_ch6.adb (Analyze_Subprogram_Body): Do not treat Inline as Inline_Always when in Configurable_Run_Time mode.
2004-10-04 Ed Schonberg <schonberg@gnat.com> * sem_ch6.adb (Analyze_Subprogram_Body): Do not treat Inline as Inline_Always when in Configurable_Run_Time mode. * sem_prag.adb (Process_Convention): If entity is an inherited subprogram, apply convention to parent subprogram if in same scope. (Analyze_Pragma, case Inline): Do not treat Inline as Inline_Always when in Configurable_Run_Time mode. From-SVN: r88498
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/sem_ch6.adb3
-rw-r--r--gcc/ada/sem_prag.adb34
3 files changed, 24 insertions, 23 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 028e9a3..2dd08a9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,15 @@
2004-10-04 Ed Schonberg <schonberg@gnat.com>
+ * sem_ch6.adb (Analyze_Subprogram_Body): Do not treat Inline as
+ Inline_Always when in Configurable_Run_Time mode.
+
+ * sem_prag.adb (Process_Convention): If entity is an inherited
+ subprogram, apply convention to parent subprogram if in same scope.
+ (Analyze_Pragma, case Inline): Do not treat Inline as Inline_Always
+ when in Configurable_Run_Time mode.
+
+2004-10-04 Ed Schonberg <schonberg@gnat.com>
+
* sem_ch3.adb (Build_Derived_Record_Type): Set First/Last entity of
class_wide type after component list has been inherited.
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 9ed4bc4..d5fc226 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -1175,8 +1175,7 @@ package body Sem_Ch6 is
Check_Following_Pragma;
if Is_Always_Inlined (Spec_Id)
- or else (Has_Pragma_Inline (Spec_Id)
- and then (Front_End_Inlining or else Configurable_Run_Time_Mode))
+ or else (Has_Pragma_Inline (Spec_Id) and then Front_End_Inlining)
then
Build_Body_To_Inline (N, Spec_Id);
end if;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index ae4aa10..b196c36 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -38,7 +38,6 @@ with Einfo; use Einfo;
with Elists; use Elists;
with Errout; use Errout;
with Exp_Dist; use Exp_Dist;
-with Fname; use Fname;
with Hostparm; use Hostparm;
with Lib; use Lib;
with Lib.Writ; use Lib.Writ;
@@ -2017,16 +2016,24 @@ package body Sem_Prag is
-- Go to renamed subprogram if present, since convention applies
-- to the actual renamed entity, not to the renaming entity.
+ -- If subprogram is inherited, go to parent subprogram.
if Is_Subprogram (E)
and then Present (Alias (E))
- and then Nkind (Parent (Declaration_Node (E))) =
- N_Subprogram_Renaming_Declaration
then
- E := Alias (E);
+ if Nkind (Parent (Declaration_Node (E)))
+ = N_Subprogram_Renaming_Declaration
+ then
+ E := Alias (E);
+
+ elsif Nkind (Parent (E)) = N_Full_Type_Declaration
+ and then Scope (E) = Scope (Alias (E))
+ then
+ E := Alias (E);
+ end if;
end if;
- -- Check that we not applying this to a specless body
+ -- Check that we are not applying this to a specless body
if Is_Subprogram (E)
and then Nkind (Parent (Declaration_Node (E))) = N_Subprogram_Body
@@ -6836,22 +6843,7 @@ package body Sem_Prag is
-- Pragma is active if inlining option is active
- if Inline_Active then
- Process_Inline (True);
-
- -- Pragma is active in a predefined file in config run time mode
-
- elsif Configurable_Run_Time_Mode
- and then
- Is_Predefined_File_Name (Unit_File_Name (Current_Sem_Unit))
- then
- Process_Inline (True);
-
- -- Otherwise inlining is not active
-
- else
- Process_Inline (False);
- end if;
+ Process_Inline (Inline_Active);
-------------------
-- Inline_Always --