+2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_util.adb (Is_Suspension_Object): Ensure that the scope of "Ada"
+ is Standard_Standard.
+
+2015-10-26 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_res.adb (Is_OK_Volatile_Context): A subprogram call is an OK
+ context for a reference to an effectively volatile object.
+ (Resolve_Actuals): Add references to SPARK RM.
+ (Within_Procedure_Call): Removed.
+ (Within_Subprogram_Call): New routine.
+
+2015-10-26 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch6.adb (Check_Aggregate_Accessibility): A reference to a
+ formal parameter in an aggregate does not need an accesibility
+ check only if the formal is aliased.
+
2015-10-26 Claire Dross <dross@adacore.com>
* sem_aux.ads (Number_Components): Can return 0 when called on
and then Comes_From_Source (A)
and then Is_Effectively_Volatile_Object (A)
then
- -- An effectively volatile object may act as an actual
- -- parameter when the corresponding formal is of a non-scalar
- -- volatile type.
+ -- An effectively volatile object may act as an actual when the
+ -- corresponding formal is of a non-scalar volatile type
+ -- (SPARK RM 7.1.3(12)).
if Is_Volatile (Etype (F))
and then not Is_Scalar_Type (Etype (F))
then
null;
- -- An effectively volatile object may act as an actual
- -- parameter in a call to an instance of Unchecked_Conversion.
+ -- An effectively volatile object may act as an actual in a
+ -- call to an instance of Unchecked_Conversion.
+ -- (SPARK RM 7.1.3(12)).
elsif Is_Unchecked_Conversion_Instance (Nam) then
null;
function Within_Check (Nod : Node_Id) return Boolean;
-- Determine whether an arbitrary node appears in a check node
- function Within_Procedure_Call (Nod : Node_Id) return Boolean;
+ function Within_Subprogram_Call (Nod : Node_Id) return Boolean;
-- Determine whether an arbitrary node appears in a procedure call
function Within_Volatile_Function (Id : Entity_Id) return Boolean;
return False;
end Within_Check;
- ---------------------------
- -- Within_Procedure_Call --
- ---------------------------
+ ----------------------------
+ -- Within_Subprogram_Call --
+ ----------------------------
- function Within_Procedure_Call (Nod : Node_Id) return Boolean is
+ function Within_Subprogram_Call (Nod : Node_Id) return Boolean is
Par : Node_Id;
begin
- -- Climb the parent chain looking for a procedure call
+ -- Climb the parent chain looking for a function or procedure call
Par := Nod;
while Present (Par) loop
- if Nkind (Par) = N_Procedure_Call_Statement then
+ if Nkind_In (Par, N_Function_Call,
+ N_Procedure_Call_Statement)
+ then
return True;
-- Prevent the search from going too far
end loop;
return False;
- end Within_Procedure_Call;
+ end Within_Subprogram_Call;
------------------------------
-- Within_Volatile_Function --
return True;
-- Assume that references to effectively volatile objects that appear
- -- as actual parameters in a procedure call are always legal. A full
+ -- as actual parameters in a subprogram call are always legal. A full
-- legality check is done when the actuals are resolved.
- elsif Within_Procedure_Call (Context) then
+ elsif Within_Subprogram_Call (Context) then
return True;
-- Otherwise the context is not suitable for an effectively volatile