aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index c463e57199c..1a074abd3de 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -1448,10 +1448,15 @@ package body Sem_Ch12 is
-- defined aspect/pragma Remote_Access_Type. In that case
-- the actual must be remote as well.
+ -- If the current instantiation is the construction of a
+ -- local copy for a formal package the actuals may be
+ -- defaulted, and there is no matching actual to check.
+
if Nkind (Analyzed_Formal) = N_Formal_Type_Declaration
and then
Nkind (Formal_Type_Definition (Analyzed_Formal)) =
N_Access_To_Object_Definition
+ and then Present (Match)
then
declare
Formal_Ent : constant Entity_Id :=