aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 15:05:10 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-25 15:05:10 +0200
commit1f70c47f8a074151222103aa69b16375584d24a0 (patch)
treecb51f33b33295373b1f9a82e8882044d03857fb3 /gcc/ada/sem_ch12.adb
parentdaad20d6820a8a84a05192d54725187d7d690ac6 (diff)
downloadgcc-1f70c47f8a074151222103aa69b16375584d24a0.zip
gcc-1f70c47f8a074151222103aa69b16375584d24a0.tar.gz
gcc-1f70c47f8a074151222103aa69b16375584d24a0.tar.bz2
[multiple changes]
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * sem_util.adb (Is_Post_State): A reference to a generic in out parameter is considered a change in the post-state of a subprogram. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Load_Parent_Of_Generic); When retrieving the declaration of a subprogram instance within its wrapper package, skip over null statements that may result from the rewriting of ignored pragmas. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Expand_Attribute_Reference, case 'Read): If the type is an unchecked_union, replace the attribute with a Raise_Program_Error (rather than inserting such before the attribute reference) to handle properly the case where we are processing a component of a larger record, and we need to prevent further expansion for the unchecked union. (Expand_Attribute_Reference, case 'Write): If the type is an unchecked_union, check whether enclosing scope is a Write subprogram. Replace attribute with a Raise_Program_Error if the discriminants of the unchecked_union type have not default values because such a use is erroneous.. 2017-04-25 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add relative_deadline to task record on edf profile. (Make_Initialize_Protection): Pass deadline_floor value on edf profile. (Make_Task_Create_Call): Pass relative_deadline value. * par-prag.adb (Prag): Handle Pragma_Deadline_Floor. * s-rident.ads (Profile_Name): Add GNAT_Ravenscar_EDF. (Profile_Info): Add info for GNAT_Ravenscar_EDF. * sem_prag.adb (Set_Ravenscar_Profile): Handle GNAT_Ravenscar_EDF (set scheduling policy). (Analyze_Pragma): Handle GNAT_Ravenscar_EDF profile and Deadline_Floor pragma. (Sig_Flags): Add choice for Pragma_Deadline_Floor. * snames.ads-tmpl (Name_Deadline_Floor, Name_Gnat_Ravenscar_EDF): New names. (Pragma_Deadline_Floor): New pragma. * targparm.adb (Get_Target_Parameters): Recognize GNAT_Ravenscar_EDF profile. From-SVN: r247221
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 3a450eb..2f2262d 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2016, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -13217,8 +13217,8 @@ package body Sem_Ch12 is
-- package, in which case the usual generic rule applies.
declare
- Exp_Status : Boolean := True;
- Scop : Entity_Id;
+ Exp_Status : Boolean := True;
+ Scop : Entity_Id;
begin
-- Loop through scopes looking for generic package
@@ -13292,8 +13292,7 @@ package body Sem_Ch12 is
-- Package instance
- if
- Nkind (Node (Decl)) = N_Package_Instantiation
+ if Nkind (Node (Decl)) = N_Package_Instantiation
then
Instantiate_Package_Body
(Info, Body_Optional => True);
@@ -13308,8 +13307,9 @@ package body Sem_Ch12 is
-- these result in the corresponding pragmas,
-- inserted after the subprogram declaration.
-- They must be skipped as well when retrieving
- -- the desired spec. A direct link would be
- -- more robust ???
+ -- the desired spec. Some of them may have been
+ -- rewritten as null statements.
+ -- A direct link would be more robust ???
declare
Decl : Node_Id :=
@@ -13317,7 +13317,9 @@ package body Sem_Ch12 is
(Specification (Info.Act_Decl))));
begin
while Nkind_In (Decl,
- N_Subprogram_Renaming_Declaration, N_Pragma)
+ N_Null_Statement,
+ N_Pragma,
+ N_Subprogram_Renaming_Declaration)
loop
Decl := Prev (Decl);
end loop;