aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_cat.adb
diff options
context:
space:
mode:
authorGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-22 17:43:43 -0300
commita926878ddbd5a98b272c22171ce58663fc04c3e0 (patch)
tree86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/ada/sem_cat.adb
parent542730f087133690b47e036dfd43eb0db8a650ce (diff)
parent07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff)
downloadgcc-devel/autopar_devel.zip
gcc-devel/autopar_devel.tar.gz
gcc-devel/autopar_devel.tar.bz2
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/ada/sem_cat.adb')
-rw-r--r--gcc/ada/sem_cat.adb30
1 files changed, 20 insertions, 10 deletions
diff --git a/gcc/ada/sem_cat.adb b/gcc/ada/sem_cat.adb
index 833df88..be1e67e 100644
--- a/gcc/ada/sem_cat.adb
+++ b/gcc/ada/sem_cat.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2020, 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- --
@@ -793,8 +793,8 @@ package body Sem_Cat is
if Ekind (E) in Subprogram_Kind then
Declaration := Unit_Declaration_Node (E);
- if Nkind_In (Declaration, N_Subprogram_Body,
- N_Subprogram_Renaming_Declaration)
+ if Nkind (Declaration) in
+ N_Subprogram_Body | N_Subprogram_Renaming_Declaration
then
Specification := Corresponding_Spec (Declaration);
end if;
@@ -1003,7 +1003,7 @@ package body Sem_Cat is
-- Body of RCI unit does not need validation
if Is_Remote_Call_Interface (E)
- and then Nkind_In (N, N_Package_Body, N_Subprogram_Body)
+ and then Nkind (N) in N_Package_Body | N_Subprogram_Body
then
return;
end if;
@@ -1506,8 +1506,8 @@ package body Sem_Cat is
null;
- elsif Ekind_In (Param_Type, E_Anonymous_Access_Type,
- E_Anonymous_Access_Subprogram_Type)
+ elsif Ekind (Param_Type) in E_Anonymous_Access_Type
+ | E_Anonymous_Access_Subprogram_Type
then
-- From RM E.2.2(14), no anonymous access parameter other than
-- controlling ones may be used (because an anonymous access
@@ -1583,9 +1583,9 @@ package body Sem_Cat is
("limited type not allowed in rci unit", Parent (E));
Explain_Limited_Type (E, Parent (E));
- elsif Ekind_In (E, E_Generic_Function,
- E_Generic_Package,
- E_Generic_Procedure)
+ elsif Ekind (E) in E_Generic_Function
+ | E_Generic_Package
+ | E_Generic_Procedure
then
Error_Msg_N ("generic declaration not allowed in rci unit",
Parent (E));
@@ -1815,7 +1815,17 @@ package body Sem_Cat is
-- 4. called from sem_res Resolve_Actuals
- if K = N_Attribute_Reference then
+ if K = N_Attribute_Definition_Clause then
+ E := Etype (Entity (N));
+
+ if Is_Remote_Access_To_Class_Wide_Type (E) then
+ Error_Msg_Name_1 := Chars (N);
+ Error_Msg_N
+ ("cannot specify% aspect for a remote operand", N);
+ return;
+ end if;
+
+ elsif K = N_Attribute_Reference then
E := Etype (Prefix (N));
if Is_Remote_Access_To_Class_Wide_Type (E) then