diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-06-05 10:30:39 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-06-20 09:30:50 +0200 |
commit | b367a66cfb620b88338111eebd549cc2fad1c16b (patch) | |
tree | b441a95e8c062caa29b88e6d6d5d02d3e6240d60 /gcc/ada | |
parent | 0aca9f500e7e8f4b6c84f25a25289b2d4d4ca95f (diff) | |
download | gcc-b367a66cfb620b88338111eebd549cc2fad1c16b.zip gcc-b367a66cfb620b88338111eebd549cc2fad1c16b.tar.gz gcc-b367a66cfb620b88338111eebd549cc2fad1c16b.tar.bz2 |
ada: Fix for attribute Range in Exceptional_Cases
Attribute Range is now handled like First and Last when occurring within
the consequence of Exceptional_Cases, i.e. attribute Range is not
considered to be a read of a formal parameter that would not be allowed
in the contract.
gcc/ada/
* sem_res.adb (Resolve_Entity_Name): Handle Range like First and Last.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/sem_res.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 6867c8f..ef3b877 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -8124,7 +8124,8 @@ package body Sem_Res is Attribute_Name (Parent (N)) in Name_Constrained | Name_First | Name_Last - | Name_Length) + | Name_Length + | Name_Range) and then not Is_By_Reference_Type (Etype (E)) and then not Is_Aliased (E) then |