diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2017-01-13 09:34:48 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-01-13 10:34:48 +0100 |
commit | d65a80fd559aca749b54eb6affd71d2d84f410f8 (patch) | |
tree | 5dd4560e392930b55539c9078451e000762bf3ea /gcc/ada/sem_ch6.adb | |
parent | 3c3b9090f86bef51e5b023616d1cfdcfa39f82b7 (diff) | |
download | gcc-d65a80fd559aca749b54eb6affd71d2d84f410f8.zip gcc-d65a80fd559aca749b54eb6affd71d2d84f410f8.tar.gz gcc-d65a80fd559aca749b54eb6affd71d2d84f410f8.tar.bz2 |
atree.adb (Allocate_Initialize_Node): A newly created node is no longer marked as Ghost at this level.
2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
* atree.adb (Allocate_Initialize_Node): A newly created node is
no longer marked as Ghost at this level.
(Mark_New_Ghost_Node): New routine.
(New_Copy): Mark the copy as Ghost.
(New_Entity): Mark the entity as Ghost.
(New_Node): Mark the node as Ghost.
* einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
apply to unanalyzed entities.
(Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
entities.
(Set_Is_Checked_Ghost_Entity): This attribute now
applies to all entities as well as unanalyzed entities.
(Set_Is_Ignored_Ghost_Entity): This attribute now applies to
all entities as well as unanalyzed entities.
* expander.adb Add with and use clauses for Ghost.
(Expand): Install and revert the Ghost region associated with the node
being expanded.
* exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
(Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
(Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
(Expand_Freeze_Record_Type): Remove all Ghost-related code.
(Freeze_Type): Install and revert the Ghost region associated
with the type being frozen.
* exp_ch5.adb Remove with and use clauses for Ghost.
(Expand_N_Assignment_Statement): Remove all Ghost-related code.
* exp_ch6.adb Remove with and use clauses for Ghost.
(Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
(Expand_N_Subprogram_Body): Remove all Ghost-related code.
* exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
Ghost region of the working type.
(Build_Invariant_Procedure_Declaration): Install and revert
the Ghost region of the working type.
(Expand_N_Package_Body): Remove all Ghost-related code.
* exp_ch8.adb Remove with and use clauses for Ghost.
(Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
code.
(Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
(Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
(Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
code.
* exp_ch13.adb Remove with and use clauses for Ghost.
(Expand_N_Freeze_Entity): Remove all Ghost-related code.
* exp_disp.adb (Make_DT): Install and revert the Ghost region of
the tagged type. Move the generation of various entities within
the Ghost region of the type.
* exp_prag.adb Remove with and use clauses for Ghost.
(Expand_Pragma_Check): Remove all Ghost-related code.
(Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
(Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
(Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
* exp_util.adb (Build_DIC_Procedure_Body): Install
and revert the Ghost region of the working types.
(Build_DIC_Procedure_Declaration): Install and revert the
Ghost region of the working type.
(Make_Invariant_Call): Install and revert the Ghost region of the
associated type.
(Make_Predicate_Call): Reimplemented. Install and revert the
Ghost region of the associated type.
* freeze.adb (Freeze_Entity): Install and revert the Ghost region
of the entity being frozen.
(New_Freeze_Node): Removed.
* ghost.adb Remove with and use clauses for Opt.
(Check_Ghost_Completion): Update the parameter profile
and all references to formal parameters.
(Ghost_Entity): Update the comment on usage.
(Install_Ghost_Mode): New routines.
(Is_Ghost_Assignment): New routine.
(Is_Ghost_Declaration): New routine.
(Is_Ghost_Pragma): New routine.
(Is_Ghost_Procedure_Call): New routine.
(Is_Ghost_Renaming): Removed.
(Is_OK_Declaration): Reimplemented.
(Is_OK_Pragma): Reimplemented.
(Is_OK_Statement): Reimplemented.
(Is_Subject_To_Ghost): Update the comment on usage.
(Mark_And_Set_Ghost_Assignment): New routine.
(Mark_And_Set_Ghost_Body): New routine.
(Mark_And_Set_Ghost_Completion): New routine.
(Mark_And_Set_Ghost_Declaration): New routine.
(Mark_And_Set_Ghost_Instantiation): New routine.
(Mark_And_Set_Ghost_Procedure_Call): New routine.
(Mark_Full_View_As_Ghost): Removed.
(Mark_Ghost_Declaration_Or_Body): New routine.
(Mark_Ghost_Pragma): New routine.
(Mark_Ghost_Renaming): New routine.
(Mark_Pragma_As_Ghost): Removed.
(Mark_Renaming_As_Ghost): Removed.
(Propagate_Ignored_Ghost_Code): Update the comment on usage.
(Prune_Node): Freeze nodes no longer need special pruning, they
are processed by the general ignored Ghost code mechanism.
(Restore_Ghost_Mode): New routine.
(Set_Ghost_Mode): Reimplemented.
(Set_Ghost_Mode_From_Entity): Removed.
* ghost.ads Add with and use clauses for Ghost.
(Check_Ghost_Completion): Update the parameter profile
along with the comment on usage.
(Install_Ghost_Mode): New routine.
(Is_Ghost_Assignment): New routine.
(Is_Ghost_Declaration): New routine.
(Is_Ghost_Pragma): New routine.
(Is_Ghost_Procedure_Call): New routine.
(Mark_And_Set_Ghost_Assignment): New routine.
(Mark_And_Set_Ghost_Body): New routine.
(Mark_And_Set_Ghost_Completion): New routine.
(Mark_And_Set_Ghost_Declaration): New routine.
(Mark_And_Set_Ghost_Instantiation): New routine.
(Mark_And_Set_Ghost_Procedure_Call): New routine.
(Mark_Full_View_As_Ghost): Removed.
(Mark_Ghost_Pragma): New routine.
(Mark_Ghost_Renaming): New routine.
(Mark_Pragma_As_Ghost): Removed.
(Mark_Renaming_As_Ghost): Removed.
(Restore_Ghost_Mode): New routine.
(Set_Ghost_Mode): Redefined.
(Set_Ghost_Mode_From_Entity): Removed.
* sem.adb (Analyze): Install and revert the Ghost region of the
node being analyzed.
(Do_Analyze): Change the way a clean Ghost
region is installed and reverted.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
all Ghost-related code.
(Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
(Analyze_Number_Declaration): Remove all Ghost-related code.
(Analyze_Object_Declaration): Install and revert the Ghost region of
a deferred object declaration's completion.
(Array_Type_Declaration): Remove all Ghost-related code.
(Build_Derived_Type): Update the comment on
the propagation of Ghost attributes from a parent to a derived type.
(Derive_Subprogram): Remove all Ghost-related code.
(Make_Class_Wide_Type): Remove all Ghost-related code.
(Make_Implicit_Base): Remove all Ghost-related code.
(Process_Full_View): Install and revert the Ghost region of
the partial view. There is no longer need to check the Ghost
completion here.
* sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
region of the left hand side.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
all Ghost-related code.
(Analyze_Expression_Function): Remove all Ghost-related code.
(Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
(Analyze_Procedure_Call): Install and revert the Ghost region of
the procedure being called.
(Analyze_Subprogram_Body_Helper): Install and revert the Ghost
region of the spec or body.
(Analyze_Subprogram_Declaration): Remove all Ghost-related code.
(Build_Subprogram_Declaration): Remove all Ghost-related code.
(Find_Corresponding_Spec): Remove all Ghost-related code.
(Process_Formals): Remove all Ghost-related code.
* sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
the Ghost region of the spec.
(Analyze_Package_Declaration): Remove all Ghost-related code.
* sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
Ghost when it aliases a Ghost entity.
(Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
a Ghost entity.
(Analyze_Object_Renaming): Mark a renaming as Ghost when
it aliases a Ghost entity.
(Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
a Ghost entity.
(Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
aliases a Ghost entity.
* sem_ch11.adb Remove with and use clauses for Ghost.
(Analyze_Exception_Declaration): Remove all Ghost-related code.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
Ghost-related code.
(Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
code.
(Analyze_Package_Instantiation): Install and revert the Ghost region
of the package instantiation.
(Analyze_Subprogram_Instantiation): Install
and revert the Ghost region of the subprogram instantiation.
(Instantiate_Package_Body): Code clean up. Install and revert the
Ghost region of the package body.
(Instantiate_Subprogram_Body): Code clean up. Install and revert the
Ghost region of the subprogram body.
* sem_ch13.adb (Build_Predicate_Functions): Install
and revert the Ghost region of the related type.
(Build_Predicate_Function_Declaration): Code clean up. Install
and rever the Ghost region of the related type.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
Install and revert the Ghost region of the pragma.
(Analyze_Initial_Condition_In_Decl_Part): Install and revert the
Ghost region of the pragma.
(Analyze_Pragma): Install and revert the Ghost region of various
pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
or encloses a Ghost entity.
(Analyze_Pre_Post_Condition): Install and revert the Ghost
region of the pragma.
(Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
Ghost region of the pragma.
* sem_res.adb (Resolve): Remove all Ghost-related code.
* sem_util.adb (Is_Declaration): Reimplemented.
(Is_Declaration_Other_Than_Renaming): New routine.
* sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
* sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
(Is_Ghost_Pragma): Removed.
(Is_Ignored_Ghost_Pragma): New routine.
(Set_Is_Checked_Ghost_Pragma): New routine.
(Set_Is_Ghost_Pragma): Removed.
(Set_Is_Ignored_Ghost_Pragma): New routine.
* sinfo.ads: Update the documentation on Ghost mode and
Ghost regions. New attributes Is_Checked_Ghost_Pragma
and Is_Ignored_Ghost_Pragma along with usages in nodes.
Remove attribute Is_Ghost_Pragma along with usages in nodes.
(Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
(Is_Ghost_Pragma): Removed along with pragma Inline.
(Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
(Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
(Set_Is_Ghost_Pragma): Removed along with pragma Inline.
(Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
From-SVN: r244395
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r-- | gcc/ada/sem_ch6.adb | 149 |
1 files changed, 39 insertions, 110 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index b3e597f..9d8792a 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -233,13 +233,6 @@ package body Sem_Ch6 is Set_Categorization_From_Scope (Subp_Id, Scop); - -- An abstract subprogram declared within a Ghost region is rendered - -- Ghost (SPARK RM 6.9(2)). - - if Ghost_Mode > None then - Set_Is_Ghost_Entity (Subp_Id); - end if; - if Ekind (Scope (Subp_Id)) = E_Protected_Type then Error_Msg_N ("abstract subprogram not allowed in protected type", N); @@ -502,15 +495,6 @@ package body Sem_Ch6 is Set_Is_Inlined (Defining_Entity (N)); - -- If the expression function is Ghost, mark its body entity as - -- Ghost too. This avoids spurious errors on unanalyzed body entities - -- of expression functions, which are not yet marked as ghost, yet - -- identified as the Corresponding_Body of the ghost declaration. - - if Is_Ghost_Entity (Def_Id) then - Set_Is_Ghost_Entity (Defining_Entity (New_Body)); - end if; - -- Establish the linkages between the spec and the body. These are -- used when the expression function acts as the prefix of attribute -- 'Access in order to freeze the original expression which has been @@ -1264,19 +1248,6 @@ package body Sem_Ch6 is Set_Is_Obsolescent (Body_Id, Is_Obsolescent (Gen_Id)); Set_Scope (Body_Id, Scope (Gen_Id)); - -- Inherit the "ghostness" of the generic spec. Note that this - -- property is not directly inherited as the body may be subject - -- to a different Ghost assertion policy. - - if Ghost_Mode > None or else Is_Ghost_Entity (Gen_Id) then - Set_Is_Ghost_Entity (Body_Id); - - -- The Ghost policy in effect at the point of declaration and at - -- the point of completion must match (SPARK RM 6.9(14)). - - Check_Ghost_Completion (Gen_Id, Body_Id); - end if; - Check_Fully_Conformant (Body_Id, Gen_Id, Body_Id); if Nkind (N) = N_Subprogram_Body_Stub then @@ -1559,10 +1530,9 @@ package body Sem_Ch6 is Loc : constant Source_Ptr := Sloc (N); P : constant Node_Id := Name (N); Actual : Node_Id; + Mode : Ghost_Mode_Type; New_N : Node_Id; - Save_Ghost_Mode : constant Ghost_Mode_Type := Ghost_Mode; - -- Start of processing for Analyze_Procedure_Call begin @@ -1604,7 +1574,7 @@ package body Sem_Ch6 is -- Set the mode now to ensure that any nodes generated during analysis -- and expansion are properly marked as Ghost. - Set_Ghost_Mode (N); + Mark_And_Set_Ghost_Procedure_Call (N, Mode); -- Otherwise analyze the parameters @@ -1628,7 +1598,7 @@ package body Sem_Ch6 is if Present (Actuals) then Error_Msg_N ("no parameters allowed for this call", First (Actuals)); - return; + goto Leave; end if; Set_Etype (N, Standard_Void_Type); @@ -1638,8 +1608,7 @@ package body Sem_Ch6 is and then Is_Record_Type (Etype (Entity (P))) and then Remote_AST_I_Dereference (P) then - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; elsif Is_Entity_Name (P) and then Ekind (Entity (P)) /= E_Entry_Family @@ -1775,7 +1744,8 @@ package body Sem_Ch6 is Error_Msg_N ("invalid procedure or entry call", N); end if; - Ghost_Mode := Save_Ghost_Mode; + <<Leave>> + Restore_Ghost_Mode (Mode); end Analyze_Procedure_Call; ------------------------------ @@ -1783,9 +1753,8 @@ package body Sem_Ch6 is ------------------------------ procedure Analyze_Return_Statement (N : Node_Id) is - - pragma Assert (Nkind_In (N, N_Simple_Return_Statement, - N_Extended_Return_Statement)); + pragma Assert (Nkind_In (N, N_Extended_Return_Statement, + N_Simple_Return_Statement)); Returns_Object : constant Boolean := Nkind (N) = N_Extended_Return_Statement @@ -2489,12 +2458,7 @@ package body Sem_Ch6 is Body_Id := Analyze_Subprogram_Specification (Body_Spec); -- Ensure that the generated corresponding spec and original body - -- share the same Ghost and SPARK_Mode attributes. - - Set_Is_Checked_Ghost_Entity - (Body_Id, Is_Checked_Ghost_Entity (Spec_Id)); - Set_Is_Ignored_Ghost_Entity - (Body_Id, Is_Ignored_Ghost_Entity (Spec_Id)); + -- share the same SPARK_Mode attributes. Set_SPARK_Pragma (Body_Id, SPARK_Pragma (Spec_Id)); Set_SPARK_Pragma_Inherited @@ -3131,7 +3095,8 @@ package body Sem_Ch6 is -- Local variables - Save_Ghost_Mode : constant Ghost_Mode_Type := Ghost_Mode; + Mode : Ghost_Mode_Type; + Mode_Set : Boolean := False; -- Start of processing for Analyze_Subprogram_Body_Helper @@ -3183,7 +3148,9 @@ package body Sem_Ch6 is -- the mode now to ensure that any nodes generated during analysis -- and expansion are properly marked as Ghost. - Set_Ghost_Mode (N, Spec_Id); + Mark_And_Set_Ghost_Body (N, Spec_Id, Mode); + Mode_Set := True; + Set_Is_Compilation_Unit (Body_Id, Is_Compilation_Unit (Spec_Id)); Set_Is_Child_Unit (Body_Id, Is_Child_Unit (Spec_Id)); @@ -3194,15 +3161,13 @@ package body Sem_Ch6 is Check_Missing_Return; end if; - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; - else - -- Previous entity conflicts with subprogram name. Attempting to - -- enter name will post error. + -- Otherwise a previous entity conflicts with the subprogram name. + -- Attempting to enter name will post error. + else Enter_Name (Body_Id); - Ghost_Mode := Save_Ghost_Mode; return; end if; @@ -3213,7 +3178,6 @@ package body Sem_Ch6 is -- analysis. elsif Prev_Id = Body_Id and then Has_Completion (Body_Id) then - Ghost_Mode := Save_Ghost_Mode; return; else @@ -3230,7 +3194,8 @@ package body Sem_Ch6 is -- Ghost. Set the mode now to ensure that any nodes generated -- during analysis and expansion are properly marked as Ghost. - Set_Ghost_Mode (N, Spec_Id); + Mark_And_Set_Ghost_Body (N, Spec_Id, Mode); + Mode_Set := True; else Spec_Id := Find_Corresponding_Spec (N); @@ -3240,7 +3205,8 @@ package body Sem_Ch6 is -- Ghost. Set the mode now to ensure that any nodes generated -- during analysis and expansion are properly marked as Ghost. - Set_Ghost_Mode (N, Spec_Id); + Mark_And_Set_Ghost_Body (N, Spec_Id, Mode); + Mode_Set := True; -- In GNATprove mode, if the body has no previous spec, create -- one so that the inlining machinery can operate properly. @@ -3304,8 +3270,7 @@ package body Sem_Ch6 is -- If this is a duplicate body, no point in analyzing it if Error_Posted (N) then - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; end if; -- A subprogram body should cause freezing of its own declaration, @@ -3342,7 +3307,8 @@ package body Sem_Ch6 is -- the mode now to ensure that any nodes generated during analysis -- and expansion are properly marked as Ghost. - Set_Ghost_Mode (N, Spec_Id); + Mark_And_Set_Ghost_Body (N, Spec_Id, Mode); + Mode_Set := True; end if; end if; @@ -3394,7 +3360,7 @@ package body Sem_Ch6 is -- function. Set_Is_Immediately_Visible (Corresponding_Spec (N), False); - return; + goto Leave; end if; -- If a separate spec is present, then deal with freezing issues @@ -3445,26 +3411,12 @@ package body Sem_Ch6 is if Is_Abstract_Subprogram (Spec_Id) then Error_Msg_N ("an abstract subprogram cannot have a body", N); - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; else Set_Convention (Body_Id, Convention (Spec_Id)); Set_Has_Completion (Spec_Id); - -- Inherit the "ghostness" of the subprogram spec. Note that this - -- property is not directly inherited as the body may be subject - -- to a different Ghost assertion policy. - - if Ghost_Mode > None or else Is_Ghost_Entity (Spec_Id) then - Set_Is_Ghost_Entity (Body_Id); - - -- The Ghost policy in effect at the point of declaration and - -- at the point of completion must match (SPARK RM 6.9(14)). - - Check_Ghost_Completion (Spec_Id, Body_Id); - end if; - if Is_Protected_Type (Scope (Spec_Id)) then Prot_Typ := Scope (Spec_Id); end if; @@ -3518,8 +3470,7 @@ package body Sem_Ch6 is if not Conformant and then not Mode_Conformant (Body_Id, Spec_Id) then - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; end if; end if; @@ -3630,13 +3581,6 @@ package body Sem_Ch6 is New_Overloaded_Entity (Body_Id); - -- A subprogram body declared within a Ghost region is automatically - -- Ghost (SPARK RM 6.9(2)). - - if Ghost_Mode > None then - Set_Is_Ghost_Entity (Body_Id); - end if; - if Nkind (N) /= N_Subprogram_Body_Stub then Set_Acts_As_Spec (N); Generate_Definition (Body_Id); @@ -3759,8 +3703,7 @@ package body Sem_Ch6 is Analyze_Aspect_Specifications_On_Body_Or_Stub (N); end if; - Ghost_Mode := Save_Ghost_Mode; - return; + goto Leave; end if; -- Handle inlining @@ -4182,7 +4125,8 @@ package body Sem_Ch6 is -- Check for variables that are never modified declare - E1, E2 : Entity_Id; + E1 : Entity_Id; + E2 : Entity_Id; begin -- If there is a separate spec, then transfer Never_Set_In_Source @@ -4247,7 +4191,10 @@ package body Sem_Ch6 is Set_Directly_Designated_Type (Etype (Spec_Id), Desig_View); end if; - Ghost_Mode := Save_Ghost_Mode; + <<Leave>> + if Mode_Set then + Restore_Ghost_Mode (Mode); + end if; end Analyze_Subprogram_Body_Helper; ------------------------------------ @@ -4309,13 +4256,6 @@ package body Sem_Ch6 is Set_SPARK_Pragma_Inherited (Designator); end if; - -- A subprogram declared within a Ghost region is automatically Ghost - -- (SPARK RM 6.9(2)). - - if Ghost_Mode > None then - Set_Is_Ghost_Entity (Designator); - end if; - if Debug_Flag_C then Write_Str ("==> subprogram spec "); Write_Name (Chars (Designator)); @@ -8197,10 +8137,6 @@ package body Sem_Ch6 is Set_Convention (Designator, Convention (E)); - if Is_Ghost_Entity (E) then - Set_Is_Ghost_Entity (Designator); - end if; - -- Skip past subprogram bodies and subprogram renamings that -- may appear to have a matching spec, but that aren't fully -- conformant with it. That can occur in cases where an @@ -9762,8 +9698,8 @@ package body Sem_Ch6 is Set_Is_Primitive (S); Check_Private_Overriding (B_Typ); - -- The Ghost policy in effect at the point of declaration of - -- a tagged type and a primitive operation must match + -- The Ghost policy in effect at the point of declaration + -- or a tagged type and a primitive operation must match -- (SPARK RM 6.9(16)). Check_Ghost_Primitive (S, B_Typ); @@ -9795,8 +9731,8 @@ package body Sem_Ch6 is Set_Has_Primitive_Operations (B_Typ); Check_Private_Overriding (B_Typ); - -- The Ghost policy in effect at the point of declaration of - -- a tagged type and a primitive operation must match + -- The Ghost policy in effect at the point of declaration + -- of a tagged type and a primitive operation must match -- (SPARK RM 6.9(16)). Check_Ghost_Primitive (S, B_Typ); @@ -11058,13 +10994,6 @@ package body Sem_Ch6 is Set_Etype (Formal, Formal_Type); - -- A formal parameter declared within a Ghost region is automatically - -- Ghost (SPARK RM 6.9(2)). - - if Ghost_Mode > None then - Set_Is_Ghost_Entity (Formal); - end if; - -- Deal with default expression if present Default := Expression (Param_Spec); |