diff options
author | Arnaud Charlet <charlet@adacore.com> | 2020-05-10 16:36:00 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-07 05:26:57 -0400 |
commit | e378df6d39e76bc5cdc56b3d7c8c57601fe8d6c0 (patch) | |
tree | 1b2b836e029bb96e12ef374a10008c0fcb0c0202 /gcc/ada/sem_util.adb | |
parent | dae09f9b557b1a38b4743a4213f7ca47c48eec81 (diff) | |
download | gcc-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.adb | 3 |
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; |