aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-05-10 16:36:00 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-07 05:26:57 -0400
commite378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0 (patch)
tree1b2b836e029bb96e12ef374a10008c0fcb0c0202 /gcc/ada/sem_util.adb
parentdae09f9b557b1a38b4743a4213f7ca47c48eec81 (diff)
downloadgcc-e378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0.zip
gcc-e378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0.tar.gz
gcc-e378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0.tar.bz2
[Ada] ACATS 4.1H - BC60005 - null exclusion matching for formal subprograms
gcc/ada/ * sem_ch6.adb (Check_Conformance): Remove unnecessary (and wrong) code. * sem_ch8.adb (Check_Null_Exclusion): Post error at proper location. Introduce new helper Null_Exclusion_Mismatch and fix implementation wrt formal subprograms used in generic bodies. (Analyze_Subprogram_Renaming): Fix missing setting of Error_Msg_Sloc. (Analyze_Object_Renaming): Replace "in Anonymous_Access_Kind" by Is_Anonymous_Access_Type. * sem_util.adb (Has_Null_Exclusion): Fix handling of N_Parameter_Specification. * sem_ch12.adb (Instantiate_Object): Replace "in Anonymous_Access_Kind" by Is_Anonymous_Access_Type.
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index d0bde334..44ed3e6 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -12066,7 +12066,8 @@ package body Sem_Util is
when N_Parameter_Specification =>
if Nkind (Parameter_Type (N)) = N_Access_Definition then
- return Null_Exclusion_Present (Parameter_Type (N));
+ return Null_Exclusion_Present (Parameter_Type (N))
+ or else Null_Exclusion_Present (N);
else
return Null_Exclusion_Present (N);
end if;