aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 17:23:31 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-01-29 17:23:31 +0100
commit4f7c83caa328ea011365f786c19953af274bb0c8 (patch)
treebf717a9c20a91caa3da27d7234d94e74e57b7ce8 /gcc/ada/sem_ch4.adb
parent385e1a992afbbff6049b69325f211fad49e0231a (diff)
downloadgcc-4f7c83caa328ea011365f786c19953af274bb0c8.zip
gcc-4f7c83caa328ea011365f786c19953af274bb0c8.tar.gz
gcc-4f7c83caa328ea011365f786c19953af274bb0c8.tar.bz2
[multiple changes]
2014-01-29 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post. * einfo.ads (Get_Pragma): Update the comment on special pragmas handled by this routine. * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post to the contract of the related subprogram body. * sem_util.adb (Add_Contract_Item): Handle the insertion of pragma Refined_Post into the contract of a subprogram body. * sinfo.ads Update the documentation of node N_Contract. * sem_res.adb (Resolve_Entity_Name): Add a guard to detect abstract states and variables only when checking the SPARK 2014 rules concerning volatile object placement. 2014-01-29 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance, null is compatible with any access type. From-SVN: r207269
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 86c4925..abcec64 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -5892,6 +5892,9 @@ package body Sem_Ch4 is
-- In Ada 2005, the equality on anonymous access types is declared
-- in Standard, and is always visible.
+ -- In an instance, the type may have been immediately visible.
+ -- Either the types are compatible, or one operand is universal
+ -- (numeric or null).
elsif In_Open_Scopes (Scope (Bas))
or else Is_Potentially_Use_Visible (Bas)
@@ -5900,6 +5903,7 @@ package body Sem_Ch4 is
or else (In_Instance
and then
(First_Subtype (T1) = First_Subtype (Etype (R))
+ or else Nkind (R) = N_Null
or else
(Is_Numeric_Type (T1)
and then Is_Universal_Numeric_Type (Etype (R)))))