+2014-11-20 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, case Implemented): In ASIS
+ (compile-only) mode, use original type declaration to determine
+ whether protected type implements an interface.
+
+2014-11-20 Yannick Moy <moy@adacore.com>
+
+ * a-cfdlli.adb, a-cfdlli.ads, a-cfinve.adb, a-cfinve.ads,
+ * a-cofove.adb, a-cofove.ads: Mark spec as SPARK_Mode, and private
+ part/body as SPARK_Mode Off.
+ * a-cfhama.adb, a-cfhama.ads, a-cfhase.adb, a-cfhase.ads,
+ * a-cforma.adb, a-cforma.ads, a-cforse.adb, a-cforse.ads: Use
+ aspect instead of pragma for uniformity.
+
+2014-11-20 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_util.adb (Is_EVF_Expression): Include
+ attributes 'Loop_Entry, 'Old and 'Update to the logic.
+
+2014-11-20 Bob Duff <duff@adacore.com>
+
+ * sem_res.adb (Make_Call_Into_Operator): Don't
+ call Left_Opnd in the case of unary operators, because they only
+ have Right.
+
2014-11-20 Pascal Obry <obry@adacore.com>
* initialize.c (ProcListCS): New extern variable (critical section).
-- --
-- B o d y --
-- --
--- Copyright (C) 2010-2013, Free Software Foundation, Inc. --
+-- Copyright (C) 2010-2014, 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- --
with System; use type System.Address;
-package body Ada.Containers.Formal_Doubly_Linked_Lists is
+package body Ada.Containers.Formal_Doubly_Linked_Lists with
+ SPARK_Mode => Off
+is
-----------------------
-- Local Subprograms --
with function "=" (Left, Right : Element_Type)
return Boolean is <>;
-package Ada.Containers.Formal_Doubly_Linked_Lists is
+package Ada.Containers.Formal_Doubly_Linked_Lists with
+ Pure,
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
- pragma Pure;
type List (Capacity : Count_Type) is private with
Iterable => (First => First,
-- scanned yet.
private
+ pragma SPARK_Mode (Off);
type Node_Type is record
Prev : Count_Type'Base := -1;
with System; use type System.Address;
-package body Ada.Containers.Formal_Hashed_Maps is
- pragma SPARK_Mode (Off);
+package body Ada.Containers.Formal_Hashed_Maps with
+ SPARK_Mode => Off
+is
-----------------------
-- Local Subprograms --
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
-package Ada.Containers.Formal_Hashed_Maps is
+package Ada.Containers.Formal_Hashed_Maps with
+ Pure,
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
- pragma Pure;
- pragma SPARK_Mode (On);
type Map (Capacity : Count_Type; Modulus : Hash_Type) is private with
Iterable => (First => First,
-- Overlap returns True if the containers have common keys
private
+ pragma SPARK_Mode (Off);
+
pragma Inline (Length);
pragma Inline (Is_Empty);
pragma Inline (Clear);
pragma Inline (Has_Element);
pragma Inline (Equivalent_Keys);
pragma Inline (Next);
- pragma SPARK_Mode (Off);
type Node_Type is record
Key : Key_Type;
with System; use type System.Address;
-package body Ada.Containers.Formal_Hashed_Sets is
- pragma SPARK_Mode (Off);
+package body Ada.Containers.Formal_Hashed_Sets with
+ SPARK_Mode => Off
+is
-----------------------
-- Local Subprograms --
with function "=" (Left, Right : Element_Type) return Boolean is <>;
-package Ada.Containers.Formal_Hashed_Sets is
+package Ada.Containers.Formal_Hashed_Sets with
+ Pure,
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
- pragma Pure;
- pragma SPARK_Mode (On);
type Set (Capacity : Count_Type; Modulus : Hash_Type) is private with
Iterable => (First => First,
-- scanned yet.
private
- pragma Inline (Next);
pragma SPARK_Mode (Off);
+ pragma Inline (Next);
+
type Node_Type is
record
Element : Element_Type;
-- <http://www.gnu.org/licenses/>. --
------------------------------------------------------------------------------
-package body Ada.Containers.Formal_Indefinite_Vectors is
+package body Ada.Containers.Formal_Indefinite_Vectors with
+ SPARK_Mode => Off
+is
function H (New_Item : Element_Type) return Holder renames To_Holder;
function E (Container : Holder) return Element_Type renames Get;
-- size, and heap allocation will be avoided. If False, the containers can
-- grow via heap allocation.
-package Ada.Containers.Formal_Indefinite_Vectors is
+package Ada.Containers.Formal_Indefinite_Vectors with
+ SPARK_Mode => On
+is
pragma Annotate (GNATprove, External_Axiomatization);
subtype Extended_Index is Index_Type'Base
Global => null;
private
+ pragma SPARK_Mode (Off);
pragma Inline (First_Index);
pragma Inline (Last_Index);
with System; use type System.Address;
-package body Ada.Containers.Formal_Ordered_Maps is
- pragma SPARK_Mode (Off);
+package body Ada.Containers.Formal_Ordered_Maps with
+ SPARK_Mode => Off
+is
-----------------------------
-- Node Access Subprograms --
with function "<" (Left, Right : Key_Type) return Boolean is <>;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
-package Ada.Containers.Formal_Ordered_Maps is
+package Ada.Containers.Formal_Ordered_Maps with
+ Pure,
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
- pragma Pure;
- pragma SPARK_Mode (On);
function Equivalent_Keys (Left, Right : Key_Type) return Boolean with
Global => null;
-- Overlap returns True if the containers have common keys
private
+ pragma SPARK_Mode (Off);
+
pragma Inline (Next);
pragma Inline (Previous);
- pragma SPARK_Mode (Off);
subtype Node_Access is Count_Type;
with System; use type System.Address;
-package body Ada.Containers.Formal_Ordered_Sets is
- pragma SPARK_Mode (Off);
+package body Ada.Containers.Formal_Ordered_Sets with
+ SPARK_Mode => Off
+is
------------------------------
-- Access to Fields of Node --
with function "<" (Left, Right : Element_Type) return Boolean is <>;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
-package Ada.Containers.Formal_Ordered_Sets is
+package Ada.Containers.Formal_Ordered_Sets with
+ Pure,
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
- pragma Pure;
- pragma SPARK_Mode (On);
function Equivalent_Elements (Left, Right : Element_Type) return Boolean
with
-- scanned yet.
private
+ pragma SPARK_Mode (Off);
+
pragma Inline (Next);
pragma Inline (Previous);
- pragma SPARK_Mode (Off);
type Node_Type is record
Has_Element : Boolean := False;
with System; use type System.Address;
-package body Ada.Containers.Formal_Vectors is
+package body Ada.Containers.Formal_Vectors with
+ SPARK_Mode => Off
+is
Growth_Factor : constant := 2;
-- When growing a container, multiply current capacity by this. Doubling
-- size, and heap allocation will be avoided. If False, the containers can
-- grow via heap allocation.
-package Ada.Containers.Formal_Vectors is
+package Ada.Containers.Formal_Vectors with
+ SPARK_Mode
+is
pragma Annotate (GNATprove, External_Axiomatization);
subtype Extended_Index is Index_Type'Base
-- scanned yet.
private
+ pragma SPARK_Mode (Off);
pragma Inline (First_Index);
pragma Inline (Last_Index);
(Is_Concurrent_Record_Type (Typ)
and then Present (Interfaces (Typ)))
+ -- In analysis-only mode, examine original protected type
+
+ or else
+ (Nkind (Parent (Typ)) = N_Protected_Type_Declaration
+ and then Present (Interface_List (Parent (Typ))))
+
-- Check for a private record extension with keyword
-- "synchronized".
and then Nkind (Original_Node (N)) = N_Function_Call
then
declare
- L : constant Node_Id := Left_Opnd (N);
+ L : Node_Id;
R : constant Node_Id := Right_Opnd (N);
Old_First : constant Node_Id :=
begin
if Is_Binary then
- Old_Sec := Next (Old_First);
+ L := Left_Opnd (N);
+ Old_Sec := Next (Old_First);
-- If the original call has named associations, replace the
-- explicit actual parameter in the association with the proper
N_Type_Conversion)
then
return Is_EVF_Expression (Expression (N));
+
+ -- Attributes 'Loop_Entry, 'Old and 'Update are an EVF expression when
+ -- their prefix denotes an EVF expression.
+
+ elsif Nkind (N) = N_Attribute_Reference
+ and then Nam_In (Attribute_Name (N), Name_Loop_Entry,
+ Name_Old,
+ Name_Update)
+ then
+ return Is_EVF_Expression (Prefix (N));
end if;
return False;