aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-10-30 12:34:41 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-10-30 12:34:41 +0100
commit039538bc35b844d57ca526bf1a274c93d251b6f5 (patch)
treeae3d2ce7780de669626aac1dfe56ce4ac6df7aaa /gcc/ada/einfo.adb
parent67848724e5d99bd27d69fc63b211658995aa9437 (diff)
downloadgcc-039538bc35b844d57ca526bf1a274c93d251b6f5.zip
gcc-039538bc35b844d57ca526bf1a274c93d251b6f5.tar.gz
gcc-039538bc35b844d57ca526bf1a274c93d251b6f5.tar.bz2
[multiple changes]
2014-10-30 Yannick Moy <moy@adacore.com> * inline.adb (Has_Single_Return_In_GNATprove_Mode): Return False when return statement is inside one or more blocks. 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an object declaration initialized by a function call that returns an unconstrained result may be rewritted as a renaming of the secondary stack result. 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com> * aspects.adb: Add an entry for aspect Extensions_Visible in table Canonical_Aspect. * aspects.ads: Add entry for aspect Extensions_Visible in tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names, Implementation_Defined_Aspect. * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in the list of contract pragmas. * par-prag.adb Pragma Extensions_Visible does not require special processing from the parser. * sem_ch3.adb (Analyze_Object_Declaration): Prevent an implicit class-wide conversion of a formal parameter of a specific tagged type whose related subprogram is subject to pragma Extensions_Visible with value "False". (Check_Abstract_Overriding): Add various overriding checks related to pragma Extensions_Visible. (Derive_Subprogram): A subprogram subject to pragma Extensions_Visible with value False requires overriding if the subprogram has at least one controlling OUT parameter. (Is_EVF_Procedure): New routine. * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of a specific tagged type whose related subprogram is subject to pragma Extensions_Visible with value "False" cannot appear in a class-wide conversion. * sem_ch6.adb (Analyze_Subprogram_Contract): Remove the assertion to account for pragma Extensions_Visible. (Check_Overriding_Indicator): An overriding subprogram inherits the contact of the overridden subprogram. (New_Overloaded_Entity): An overriding subprogram inherits the contact of the overridden subprogram. * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for aspect Extensions_Visible. (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not require special processing at the freeze point. * sem_prag.adb Add an entry for pragma Extensions_Visible in table Sig_Flags. (Analyze_Pragma): Ensure that various SPARK pragmas lack identifiers in their arguments. Add processing for pragma Extensions_Visible. (Chain_CTC): Code reformatting. * sem_res.adb (Resolve_Actuals): A formal parameter of a specific tagged type whose related subprogram is subject to pragma Extensions_Visible with value "False" cannot act as an actual in a subprogram with value "True". * sem_util.adb (Add_Classification): New routine. (Add_Contract_Item): Account for pragma Extensions_Visible. Code reformatting. (Add_Contract_Test_Case): New routine. (Add_Pre_Post_Condition): New routine. (Extensions_Visible_Status): New routine. (Inherit_Subprogram_Contract): New routine. (Is_EVF_Expression): New routine. (Is_Specific_Tagged_Type): New routine. * sem_util.ads Add type Extensions_Visible_Mode and document all values. (Add_Contract_Item): Add pragma Extensions_Visible to the comment on usage. (Inherit_Subprogram_Contract): New routine. (Is_EVF_Expression): New routine. (Is_Specific_Tagged_Type): New routine. * sinfo.adb (Is_Inherited): New routine. (Set_Is_Inherited): New routine. * sinfo.ads Add flag Is_Inherited along with its usage in nodes. (Is_Inherited): New routine along with pragma Inline. (Set_Is_Inherited): New routine along with pragma Inline. * snames.ads-tmpl: Add predefined name "Extensions_Visible" and a new Pragma_Id for the pragma. From-SVN: r216919
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb35
1 files changed, 18 insertions, 17 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 18cac0f..aaa6ea5 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -6684,31 +6684,32 @@ package body Einfo is
function Get_Pragma (E : Entity_Id; Id : Pragma_Id) return Node_Id is
Is_CDG : constant Boolean :=
- Id = Pragma_Abstract_State or else
- Id = Pragma_Async_Readers or else
- Id = Pragma_Async_Writers or else
- Id = Pragma_Depends or else
- Id = Pragma_Effective_Reads or else
- Id = Pragma_Effective_Writes or else
- Id = Pragma_Global or else
- Id = Pragma_Initial_Condition or else
- Id = Pragma_Initializes or else
- Id = Pragma_Part_Of or else
- Id = Pragma_Refined_Depends or else
- Id = Pragma_Refined_Global or else
+ Id = Pragma_Abstract_State or else
+ Id = Pragma_Async_Readers or else
+ Id = Pragma_Async_Writers or else
+ Id = Pragma_Depends or else
+ Id = Pragma_Effective_Reads or else
+ Id = Pragma_Effective_Writes or else
+ Id = Pragma_Extensions_Visible or else
+ Id = Pragma_Global or else
+ Id = Pragma_Initial_Condition or else
+ Id = Pragma_Initializes or else
+ Id = Pragma_Part_Of or else
+ Id = Pragma_Refined_Depends or else
+ Id = Pragma_Refined_Global or else
Id = Pragma_Refined_State;
Is_CTC : constant Boolean :=
- Id = Pragma_Contract_Cases or else
+ Id = Pragma_Contract_Cases or else
Id = Pragma_Test_Case;
Is_PPC : constant Boolean :=
- Id = Pragma_Precondition or else
- Id = Pragma_Postcondition or else
+ Id = Pragma_Precondition or else
+ Id = Pragma_Postcondition or else
Id = Pragma_Refined_Post;
In_Contract : constant Boolean := Is_CDG or Is_CTC or Is_PPC;
- Item : Node_Id;
- Items : Node_Id;
+ Item : Node_Id;
+ Items : Node_Id;
begin
-- Handle pragmas that appear in N_Contract nodes. Those have to be