diff options
author | Yannick Moy <moy@adacore.com> | 2019-09-19 08:14:13 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2019-09-19 08:14:13 +0000 |
commit | 4fe56329e05e3e77c424929fdb102f2df075f74a (patch) | |
tree | 55142059c873bd5820d3d5044dc773e62e0a1fa3 /gcc/ada | |
parent | 46fa6b050e81504aab992d58b693aa81dd45eeb9 (diff) | |
download | gcc-4fe56329e05e3e77c424929fdb102f2df075f74a.zip gcc-4fe56329e05e3e77c424929fdb102f2df075f74a.tar.gz gcc-4fe56329e05e3e77c424929fdb102f2df075f74a.tar.bz2 |
[Ada] Use declared type for deciding on SPARK pointer rules
A constant of pointer type is considered as mutable in SPARK, according
to SPARK RM 3.10, but this should be based on the declared type of the
constant instead of its underlying type.
There is no impact on compilation hence no test.
2019-09-19 Yannick Moy <moy@adacore.com>
gcc/ada/
* sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous
test.
From-SVN: r275950
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e761f70..54e48af 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-09-19 Yannick Moy <moy@adacore.com> + + * sem_prag.adb (Analyze_Depends_In_Decl_Part): Simplify previous + test. + 2019-09-19 Ed Schonberg <schonberg@adacore.com> * sem_ch7.adb (Install_Parent_Private_Declarations): If a diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 4367383..b54604d 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1272,13 +1272,7 @@ package body Sem_Prag is if Ekind_In (Item_Id, E_Constant, E_Generic_In_Parameter, E_In_Parameter) - - -- If Item_Id is of a private type whose completion has not been - -- analyzed yet, its Underlying_Type is empty and we handle it - -- as a constant. - - and then Present (Underlying_Type (Etype (Item_Id))) - and then Is_Access_Type (Underlying_Type (Etype (Item_Id))) + and then Is_Access_Type (Etype (Item_Id)) then Adjusted_Kind := E_Variable; end if; |