aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 14:42:03 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2016-04-27 14:42:03 +0200
commita6ac73115af92e964988677378306f5c08dd0ddf (patch)
treed6927bc3c480a774a2a1da60a2833673f3729a23
parent888be6b18a697c7f57f2f74fa8dbab058bb819ef (diff)
downloadgcc-a6ac73115af92e964988677378306f5c08dd0ddf.zip
gcc-a6ac73115af92e964988677378306f5c08dd0ddf.tar.gz
gcc-a6ac73115af92e964988677378306f5c08dd0ddf.tar.bz2
[multiple changes]
2016-04-27 Vincent Celier <celier@adacore.com> * gnatcmd.adb: For "gnat ls -V -P", recognize switch --unchecked-shared-lib-imports and set the flag Opt.Unchecked_Shared_Lib_Imports accordingly. 2016-04-27 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part): A generic subprogram is never a primitive operation, and thus a classwide condition for it is not legal. 2016-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor reformatting. From-SVN: r235494
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/einfo.adb8
-rw-r--r--gcc/ada/gnatcmd.adb10
-rw-r--r--gcc/ada/sem_aggr.adb4
-rw-r--r--gcc/ada/sem_dim.adb4
-rw-r--r--gcc/ada/sem_dim.ads16
-rw-r--r--gcc/ada/sem_prag.adb5
7 files changed, 43 insertions, 21 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index eb0f5ae..1cf844c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,20 @@
+2016-04-27 Vincent Celier <celier@adacore.com>
+
+ * gnatcmd.adb: For "gnat ls -V -P", recognize switch
+ --unchecked-shared-lib-imports and set the flag
+ Opt.Unchecked_Shared_Lib_Imports accordingly.
+
+2016-04-27 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
+ A generic subprogram is never a primitive operation, and thus
+ a classwide condition for it is not legal.
+
+2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
+ reformatting.
+
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index 32a56a6..eade226 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -3935,17 +3935,13 @@ package body Einfo is
procedure Set_Corresponding_Function (Id : E; V : E) is
begin
- pragma Assert
- (Ekind (Id) = E_Procedure
- and then Rewritten_For_C (V));
+ pragma Assert (Ekind (Id) = E_Procedure and then Rewritten_For_C (V));
Set_Node32 (Id, V);
end Set_Corresponding_Function;
procedure Set_Corresponding_Procedure (Id : E; V : E) is
begin
- pragma Assert
- (Ekind (Id) = E_Function
- and then Rewritten_For_C (Id));
+ pragma Assert (Ekind (Id) = E_Function and then Rewritten_For_C (Id));
Set_Node32 (Id, V);
end Set_Corresponding_Procedure;
diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
index 2432f89..433ac7d 100644
--- a/gcc/ada/gnatcmd.adb
+++ b/gcc/ada/gnatcmd.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1996-2015, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-2016, 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- --
@@ -983,6 +983,14 @@ begin
Remove_Switch (Arg_Num);
+ -- --unchecked-shared-lib-imports
+
+ elsif Argv.all = "--unchecked-shared-lib-imports" then
+ Opt.Unchecked_Shared_Lib_Imports := True;
+ Remove_Switch (Arg_Num);
+
+ -- gnat list -U
+
elsif
The_Command = List
and then Argv'Length = 2
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 575a1d2..876521b 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -2052,8 +2052,8 @@ package body Sem_Aggr is
Set_Parent (Expr, Parent (Expression (Assoc)));
Analyze (Expr);
- -- Compute its dimensions now, rather than at the end
- -- of resolution, because in the case of multidimensional
+ -- Compute its dimensions now, rather than at the end of
+ -- resolution, because in the case of multidimensional
-- aggregates subsequent expansion may lead to spurious
-- errors.
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb
index 754be84..4a92015 100644
--- a/gcc/ada/sem_dim.adb
+++ b/gcc/ada/sem_dim.adb
@@ -2277,8 +2277,8 @@ package body Sem_Dim is
---------------------------------
procedure Check_Expression_Dimensions
- (Expr : Node_Id;
- Typ : Entity_Id)
+ (Expr : Node_Id;
+ Typ : Entity_Id)
is
begin
if Is_Floating_Point_Type (Etype (Expr)) then
diff --git a/gcc/ada/sem_dim.ads b/gcc/ada/sem_dim.ads
index bce497a..44f4e86 100644
--- a/gcc/ada/sem_dim.ads
+++ b/gcc/ada/sem_dim.ads
@@ -165,14 +165,14 @@ package Sem_Dim is
-- literal default value in the list of formals Formals.
procedure Check_Expression_Dimensions
- (Expr : Node_Id;
- Typ : Entity_Id);
- -- Compute dimensions of a floating-point expression and compare them
- -- with the dimensions of a the given type. Used to verify dimensions
- -- of the components of a multidimensional array type, for which components
- -- are typically themselves arrays. The resolution of such arrays delays
- -- the resolution of the ultimate components to a separate phase, which
- -- forces this separate dimension verification.
+ (Expr : Node_Id;
+ Typ : Entity_Id);
+ -- Compute dimensions of a floating-point expression and compare them with
+ -- the dimensions of a the given type. Used to verify dimensions of the
+ -- components of a multidimensional array type, for which components are
+ -- typically themselves arrays. The resolution of such arrays delays the
+ -- resolution of the ultimate components to a separate phase, which forces
+ -- this separate dimension verification.
procedure Copy_Dimensions (From, To : Node_Id);
-- Copy dimension vector of node From to node To. Note that To must be a
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 3d3683c..14b53ee 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -23319,11 +23319,12 @@ package body Sem_Prag is
if Class_Present (N) then
-- Verify that a class-wide condition is legal, i.e. the operation is
- -- a primitive of a tagged type.
+ -- a primitive of a tagged type. Note that a generic subprogram is
+ -- not a primitive operation.
Disp_Typ := Find_Dispatching_Type (Spec_Id);
- if No (Disp_Typ) then
+ if No (Disp_Typ) or else Is_Generic_Subprogram (Spec_Id) then
Error_Msg_Name_1 := Original_Aspect_Pragma_Name (N);
if From_Aspect_Specification (N) then