aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-10-14 16:22:16 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-11-25 08:22:33 -0500
commit2d80df423310f1c40a3a661d5587261ee9151288 (patch)
tree69f9d5e3068d91f2a6e097c7a19aadcced286416
parent595c9aebadbbbfa5f8f93dd069fd71c428dfd170 (diff)
downloadgcc-2d80df423310f1c40a3a661d5587261ee9151288.zip
gcc-2d80df423310f1c40a3a661d5587261ee9151288.tar.gz
gcc-2d80df423310f1c40a3a661d5587261ee9151288.tar.bz2
[Ada] Remove dead and duplicated diagnostics for generic access types
gcc/ada/ * sem_ch12.adb (Instantiate_Type): Remove extra whitespace. (Validate_Access_Type_Instance): Remove dead (and duplicated) code.
-rw-r--r--gcc/ada/sem_ch12.adb21
1 files changed, 3 insertions, 18 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index ab68f72..99a62c4 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -12645,10 +12645,10 @@ package body Sem_Ch12 is
Analyzed_Formal : Node_Id;
Actual_Decls : List_Id) return List_Id
is
- A_Gen_T : constant Entity_Id :=
+ A_Gen_T : constant Entity_Id :=
Defining_Identifier (Analyzed_Formal);
- Def : constant Node_Id := Formal_Type_Definition (Formal);
- Gen_T : constant Entity_Id := Defining_Identifier (Formal);
+ Def : constant Node_Id := Formal_Type_Definition (Formal);
+ Gen_T : constant Entity_Id := Defining_Identifier (Formal);
Act_T : Entity_Id;
Ancestor : Entity_Id := Empty;
Decl_Node : Node_Id;
@@ -12958,21 +12958,6 @@ package body Sem_Ch12 is
end if;
Abandon_Instantiation (Actual);
-
- elsif Is_Access_Type (Designated_Type (Act_T))
- and then Is_Constrained (Designated_Type (Designated_Type (Act_T)))
- /=
- Is_Constrained (Designated_Type (Desig_Type))
- then
- Error_Msg_NE
- ("designated type of actual does not match that of formal &",
- Actual, Gen_T);
-
- if not Predicates_Match (Desig_Type, Desig_Act) then
- Error_Msg_N ("\predicates do not match", Actual);
- end if;
-
- Abandon_Instantiation (Actual);
end if;
-- Ada 2005: null-exclusion indicators of the two types must agree