+2015-11-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnatlink.adb (Gnatlink): Do not reinstate -fsjlj for the linker
+ from the switches saved in the ALI file but from the exception
+ settings.
+
+2015-11-25 Arnaud Charlet <charlet@adacore.com>
+
+ * lib-xref-spark_specific.adb
+ (Add_SPARK_Scope): Take entry families into account.
+ * a-exetim.ads, a-exetim-default.ads, a-exetim-mingw.ads (Clock,
+ Clock_For_Interrupts): preconditions added.
+ * a-extiin.ads (Clock): preconditions added.
+ * par-ch3.adb (P_Declarative_Items): In case of misplaced
+ aspect specifications, ensure that flag Done is properly set to
+ continue parsing.
+
2015-11-25 Arnaud Charlet <charlet@adacore.com>
* exp_util.adb (Remove_Side_Effects): Minimize extra temporaries
CPU_Time_Unit : constant := Ada.Real_Time.Time_Unit;
CPU_Tick : constant Ada.Real_Time.Time_Span;
+ use type Ada.Task_Identification.Task_Id;
+
function Clock
(T : Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task)
return CPU_Time
with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => T /= Ada.Task_Identification.Null_Task_Id;
function "+"
(Left : CPU_Time;
Interrupt_Clocks_Supported : constant Boolean := False;
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
+ pragma Warnings (Off, "check will fail at run time");
function Clock_For_Interrupts return CPU_Time with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => Interrupt_Clocks_Supported;
+ pragma Warnings (On, "check will fail at run time");
private
pragma SPARK_Mode (Off);
CPU_Time_Unit : constant := 0.000001;
CPU_Tick : constant Ada.Real_Time.Time_Span;
+ use type Ada.Task_Identification.Task_Id;
+
function Clock
(T : Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task)
return CPU_Time
with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => T /= Ada.Task_Identification.Null_Task_Id;
function "+"
(Left : CPU_Time;
Interrupt_Clocks_Supported : constant Boolean := False;
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
+ pragma Warnings (Off, "check will fail at run time");
function Clock_For_Interrupts return CPU_Time with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => Interrupt_Clocks_Supported;
+ pragma Warnings (On, "check will fail at run time");
private
pragma SPARK_Mode (Off);
CPU_Time_Unit : constant := 0.000001;
CPU_Tick : constant Ada.Real_Time.Time_Span;
+ use type Ada.Task_Identification.Task_Id;
+
function Clock
(T : Ada.Task_Identification.Task_Id :=
Ada.Task_Identification.Current_Task)
return CPU_Time
with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => T /= Ada.Task_Identification.Null_Task_Id;
function "+"
(Left : CPU_Time;
Interrupt_Clocks_Supported : constant Boolean := False;
Separate_Interrupt_Clocks_Supported : constant Boolean := False;
+ pragma Warnings (Off, "check will fail at run time");
function Clock_For_Interrupts return CPU_Time with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => Interrupt_Clocks_Supported;
+ pragma Warnings (On, "check will fail at run time");
private
pragma SPARK_Mode (Off);
function Clock (Interrupt : Ada.Interrupts.Interrupt_ID) return CPU_Time
with
Volatile_Function,
- Global => Ada.Real_Time.Clock_Time;
+ Global => Ada.Real_Time.Clock_Time,
+ Pre => Separate_Interrupt_Clocks_Supported;
function Supported (Interrupt : Ada.Interrupts.Interrupt_ID) return Boolean
with
end if;
end;
end loop;
+
+ -- Pass -fsjlj to the linker with back-end SJLJ exceptions
+
+ if not ALIs.Table (A).Frontend_Exceptions
+ and then not ALIs.Table (A).Zero_Cost_Exceptions
+ then
+ Linker_Options.Increment_Last;
+ Linker_Options.Table
+ (Linker_Options.Last) := new String'("-fsjlj");
+ end if;
end if;
end;
end if;
case Ekind (E) is
when E_Entry
+ | E_Entry_Family
| E_Function
| E_Generic_Function
| E_Generic_Package
function Is_SPARK_Scope (E : Entity_Id) return Boolean;
-- Return whether the entity or reference scope meets requirements for
- -- being an SPARK scope.
+ -- being a SPARK scope.
function Lt (Op1 : Natural; Op2 : Natural) return Boolean;
-- Comparison function for Sort call
else
Error_Msg_SC ("aspect specifications not allowed here");
+ end if;
- -- Assume that this is a misplaced aspect specification
- -- within a declarative list. After discarding the
- -- misplaced aspects we can continue the scan.
+ -- Assume that this is a misplaced aspect specification within
+ -- a declarative list. After discarding the misplaced aspects
+ -- we can continue the scan.
- Done := False;
- end if;
+ Done := False;
declare
Dummy_Node : constant Node_Id :=