aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 11:42:53 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2015-10-20 11:42:53 +0200
commit40417de8ab869572f58b96b987ad4fca4f0cd783 (patch)
treef4993289c7ca70623107b4a58f83baac6c5e986d /gcc/ada
parentb8a1821614cbf7e5c117bf0a7a215e3c3a81f8c3 (diff)
downloadgcc-40417de8ab869572f58b96b987ad4fca4f0cd783.zip
gcc-40417de8ab869572f58b96b987ad4fca4f0cd783.tar.gz
gcc-40417de8ab869572f58b96b987ad4fca4f0cd783.tar.bz2
[multiple changes]
2015-10-20 Vincent Celier <celier@adacore.com> * prj-attr.adb: Add package Codepeer and its attributes. 2015-10-20 Thomas Quinot <quinot@adacore.com> * sem_ch3.adb, sem_ch13.adb: Minor reformatting. 2015-10-20 Eric Botcazou <ebotcazou@adacore.com> * gnatlink.adb (Gnatlink): Do not translate --RTS switch for the linker and instead pass the switches that were reinstated by the compiler. 2015-10-20 Bob Duff <duff@adacore.com> * a-contai.ads, a-convec.ads: Move Count_Type_Last from a-convec.ads to a-contai.ads, so other containers can refer to it. From-SVN: r229027
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog19
-rw-r--r--gcc/ada/a-contai.ads4
-rw-r--r--gcc/ada/a-convec.ads5
-rw-r--r--gcc/ada/gnatlink.adb49
-rw-r--r--gcc/ada/prj-attr.adb12
-rw-r--r--gcc/ada/sem_ch13.adb8
-rw-r--r--gcc/ada/sem_ch3.adb2
7 files changed, 66 insertions, 33 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2bfc507..3b1a4eb 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,22 @@
+2015-10-20 Vincent Celier <celier@adacore.com>
+
+ * prj-attr.adb: Add package Codepeer and its attributes.
+
+2015-10-20 Thomas Quinot <quinot@adacore.com>
+
+ * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
+
+2015-10-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnatlink.adb (Gnatlink): Do not translate --RTS switch
+ for the linker and instead pass the switches that were
+ reinstated by the compiler.
+
+2015-10-20 Bob Duff <duff@adacore.com>
+
+ * a-contai.ads, a-convec.ads: Move Count_Type_Last from
+ a-convec.ads to a-contai.ads, so other containers can refer to it.
+
2015-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Nonoverridable_Aspects): New procedure within
diff --git a/gcc/ada/a-contai.ads b/gcc/ada/a-contai.ads
index 26f1f8d..02dc28f 100644
--- a/gcc/ada/a-contai.ads
+++ b/gcc/ada/a-contai.ads
@@ -34,6 +34,10 @@ package Ada.Containers is
private
+ Count_Type_Last : constant := Count_Type'Last;
+ -- Count_Type'Last as a universal_integer, so we can compare Index_Type
+ -- values against this without type conversions that might overflow.
+
type Tamper_Counts is record
Busy : Natural := 0;
Lock : Natural := 0;
diff --git a/gcc/ada/a-convec.ads b/gcc/ada/a-convec.ads
index e494386..0356431 100644
--- a/gcc/ada/a-convec.ads
+++ b/gcc/ada/a-convec.ads
@@ -370,6 +370,7 @@ private
use Implementation;
type Elements_Array is array (Index_Type range <>) of aliased Element_Type;
+ function "=" (L, R : Elements_Array) return Boolean is abstract;
type Elements_Type (Last : Extended_Index) is limited record
EA : Elements_Array (Index_Type'First .. Last);
@@ -490,10 +491,6 @@ private
Empty_Vector : constant Vector := (Controlled with others => <>);
- Count_Type_Last : constant := Count_Type'Last;
- -- Count_Type'Last as a universal_integer, so we can compare Index_Type
- -- values against this without type conversions that might overflow.
-
type Iterator is new Limited_Controlled and
Vector_Iterator_Interfaces.Reversible_Iterator with
record
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb
index e94cae9..f50c946 100644
--- a/gcc/ada/gnatlink.adb
+++ b/gcc/ada/gnatlink.adb
@@ -1539,8 +1539,7 @@ begin
loop
-- Do not compile with the front end switches. However, --RTS
-- is to be dealt with specially because it needs to be passed
- -- if the binder-generated file is in Ada and may also be used
- -- to drive the linker.
+ -- to compile the file generated by the binder.
declare
Arg : String_Ptr renames Args.Table (Index);
@@ -1550,6 +1549,31 @@ begin
Binder_Options_From_ALI.Table
(Binder_Options_From_ALI.Last) := String_Access (Arg);
+ -- GNAT doesn't support GCC's multilib mechanism when it
+ -- is configured with --disable-libada. This means that,
+ -- when a multilib switch is used to request a particular
+ -- compilation mode, the corresponding --RTS switch must
+ -- also be specified. It is convenient to eliminate the
+ -- redundancy by keying the compilation mode on a single
+ -- switch, namely --RTS, and have the compiler reinstate
+ -- the multilib switch (see gcc-interface/lang-specs.h).
+ -- This switch must be passed to the driver at link time.
+
+ if Arg'Length = 5
+ and then Arg (Arg'First + 1 .. Arg'First + 4) = "mrtp"
+ then
+ Linker_Options.Increment_Last;
+ Linker_Options.Table
+ (Linker_Options.Last) := String_Access (Arg);
+
+ elsif Arg'Length = 6
+ and then Arg (Arg'First + 1 .. Arg'First + 5) = "fsjlj"
+ then
+ Linker_Options.Increment_Last;
+ Linker_Options.Table
+ (Linker_Options.Last) := String_Access (Arg);
+ end if;
+
elsif Arg'Length > 5
and then Arg (Arg'First + 2 .. Arg'First + 5) = "RTS="
then
@@ -1568,27 +1592,6 @@ begin
Opt.RTS_Lib_Path_Name :=
Get_RTS_Search_Dir
(Arg (Arg'First + 6 .. Arg'Last), Objects);
-
- -- GNAT doesn't support the GCC multilib mechanism.
- -- This means that, when a multilib switch is used
- -- to request a particular compilation mode, the
- -- corresponding runtime switch (--RTS) must also be
- -- specified. The long-term goal is to fully support the
- -- multilib mechanism; however, in the meantime, it is
- -- convenient to eliminate the redundancy by keying the
- -- compilation mode on a single switch, namely --RTS.
-
- -- Pass -mrtp to the linker if --RTS=rtp was passed
-
- if Arg'Length > 8
- and then
- (Arg (Arg'First + 6 .. Arg'First + 8) = "rtp"
- or else Arg (Arg'Last - 2 .. Arg'Last) = "rtp")
- then
- Linker_Options.Increment_Last;
- Linker_Options.Table (Linker_Options.Last) :=
- new String'("-mrtp");
- end if;
end if;
end;
end loop;
diff --git a/gcc/ada/prj-attr.adb b/gcc/ada/prj-attr.adb
index 201d6b8..66de7c7 100644
--- a/gcc/ada/prj-attr.adb
+++ b/gcc/ada/prj-attr.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2014, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2015, 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- --
@@ -379,6 +379,16 @@ package body Prj.Attr is
"Pstack#" &
"LVswitches#" &
+ -- package Codepeer
+
+ "Pcodepeer#" &
+ "SVoutput_directory#" &
+ "SVdatabase_directory#" &
+ "SVmessage_patterns#" &
+ "SVadditional_patterns#" &
+ "LVswitches#" &
+ "LVexcluded_source_files#" &
+
"#";
Initialized : Boolean := False;
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index 5de48dd..c3af7ce 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -1447,9 +1447,6 @@ package body Sem_Ch13 is
Disc : Entity_Id;
Parent_Disc : Entity_Id;
- -- For a type extension, check whether parent has a
- -- reference discriminant, to verify that use is proper.
-
begin
if not Is_Type (E) or else not Has_Discriminants (E) then
Error_Msg_N
@@ -1474,7 +1471,7 @@ package body Sem_Ch13 is
Next_Discriminant (Disc);
end loop;
- -- Error if no proper access discriminant.
+ -- Error if no proper access discriminant
if No (Disc) then
Error_Msg_NE
@@ -1483,6 +1480,9 @@ package body Sem_Ch13 is
end if;
end if;
+ -- For a type extension, check whether parent has a
+ -- reference discriminant, to verify that use is proper.
+
if Is_Derived_Type (E)
and then Has_Discriminants (Etype (E))
then
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 2000f42..2649f4d 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -2615,7 +2615,7 @@ package body Sem_Ch3 is
return False;
end Has_Aspect_Spec;
- -- Start of processing for Check_Nonoverridable_Aspects
+ -- Start of processing for Check_Nonoverridable_Aspects
begin