summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_prag.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:57:56 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-04 14:57:56 +0000
commitcb75489d5040b84fb6651a485a2be415515f651a (patch)
tree5967ad580b6b278f38c7fea4a2f49131b82ffe2e /gcc/ada/sem_prag.adb
parent01e7e23d70b079e0c4e269c879414cc813298c74 (diff)
downloadgcc-cb75489d5040b84fb6651a485a2be415515f651a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88498 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r--gcc/ada/sem_prag.adb34
1 files changed, 13 insertions, 21 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index ae4aa108d5e..b196c36d3c8 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 --