aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-11-25 16:30:09 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2015-11-25 16:30:09 +0100
commit8e2d104ba2f4f89d6479d03f75cc374484875fc7 (patch)
tree0b4ee010f8f17eeae93b58244a06c4db1d8650d9 /gcc/ada
parent7b52257cfa555812c6755dd69f21ee92e7d2bd5b (diff)
downloadgcc-8e2d104ba2f4f89d6479d03f75cc374484875fc7.zip
gcc-8e2d104ba2f4f89d6479d03f75cc374484875fc7.tar.gz
gcc-8e2d104ba2f4f89d6479d03f75cc374484875fc7.tar.bz2
[multiple changes]
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. From-SVN: r230879
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/a-exetim-default.ads10
-rw-r--r--gcc/ada/a-exetim-mingw.ads10
-rw-r--r--gcc/ada/a-exetim.ads10
-rw-r--r--gcc/ada/a-extiin.ads3
-rw-r--r--gcc/ada/gnatlink.adb10
-rw-r--r--gcc/ada/lib-xref-spark_specific.adb3
-rw-r--r--gcc/ada/par-ch3.adb10
8 files changed, 60 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index db50698..d7df276 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,20 @@
+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
diff --git a/gcc/ada/a-exetim-default.ads b/gcc/ada/a-exetim-default.ads
index 5877fc5..50b9bc5 100644
--- a/gcc/ada/a-exetim-default.ads
+++ b/gcc/ada/a-exetim-default.ads
@@ -47,13 +47,16 @@ is
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;
@@ -105,9 +108,12 @@ is
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);
diff --git a/gcc/ada/a-exetim-mingw.ads b/gcc/ada/a-exetim-mingw.ads
index 8e1e764..5ba3e08 100644
--- a/gcc/ada/a-exetim-mingw.ads
+++ b/gcc/ada/a-exetim-mingw.ads
@@ -49,13 +49,16 @@ is
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;
@@ -105,9 +108,12 @@ is
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);
diff --git a/gcc/ada/a-exetim.ads b/gcc/ada/a-exetim.ads
index 951c3ed..d75b6be 100644
--- a/gcc/ada/a-exetim.ads
+++ b/gcc/ada/a-exetim.ads
@@ -38,13 +38,16 @@ is
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;
@@ -96,9 +99,12 @@ is
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);
diff --git a/gcc/ada/a-extiin.ads b/gcc/ada/a-extiin.ads
index e35c32d..a4edb8f 100644
--- a/gcc/ada/a-extiin.ads
+++ b/gcc/ada/a-extiin.ads
@@ -25,7 +25,8 @@ is
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
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb
index 67b07b2..0d190eb 100644
--- a/gcc/ada/gnatlink.adb
+++ b/gcc/ada/gnatlink.adb
@@ -1588,6 +1588,16 @@ begin
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;
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb
index b570725..c857b0f 100644
--- a/gcc/ada/lib-xref-spark_specific.adb
+++ b/gcc/ada/lib-xref-spark_specific.adb
@@ -260,6 +260,7 @@ package body SPARK_Specific is
case Ekind (E) is
when E_Entry
+ | E_Entry_Family
| E_Function
| E_Generic_Function
| E_Generic_Package
@@ -330,7 +331,7 @@ package body SPARK_Specific is
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
diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb
index 5859bce..3863c5a 100644
--- a/gcc/ada/par-ch3.adb
+++ b/gcc/ada/par-ch3.adb
@@ -4441,13 +4441,13 @@ package body Ch3 is
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 :=