diff options
author | Ed Schonberg <schonber@gnat.com> | 2004-10-04 16:57:56 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2004-10-04 16:57:56 +0200 |
commit | c71c53a8554e4bab6e4c375319f1af5d8584b88a (patch) | |
tree | 5967ad580b6b278f38c7fea4a2f49131b82ffe2e /gcc/ada/sem_prag.adb | |
parent | 71d9e9f213d295971b7cb339ee18513bcbf45e2d (diff) | |
download | gcc-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/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 34 |
1 files changed, 13 insertions, 21 deletions
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 -- |