aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-05-02 10:26:12 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-05-02 10:26:12 +0200
commitd59179b15e717e87a5c27bc90e7d16f541caa740 (patch)
tree4715ec2bb7050196ddf845a257e2307f8cd49c5b /gcc/ada/sem_ch6.adb
parent26de50b098414b0322acad162a1797fe06bd261b (diff)
downloadgcc-d59179b15e717e87a5c27bc90e7d16f541caa740.zip
gcc-d59179b15e717e87a5c27bc90e7d16f541caa740.tar.gz
gcc-d59179b15e717e87a5c27bc90e7d16f541caa740.tar.bz2
[multiple changes]
2017-05-02 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Fully_Conformant_Expressions): Two entity references are fully conformant if they are both expansions of the discriminant of a protected type, within one of the protected operations. One occurrence may be expanded into a constant declaration while the other is an input parameter to the corresponding generated subprogram. 2017-05-02 Justin Squirek <squirek@adacore.com> * sem_ch3.adb (Check_For_Null_Excluding_Components): Created for recursivly searching composite-types for null-excluding access types and verifying them. (Analyze_Object_Declaration): Add a call to Check_Null_Excluding_Components for static verification of non-initialized objects. * checks.adb, checks.ads (Null_Exclusion_Static_Checks): Added a parameter for a composite-type's component and an extra case for printing component information. 2017-05-02 Yannick Moy <moy@adacore.com> * sem_ch10.adb (Analyze_Subunit): Take configuration pragma into account when restoring appropriate pragma for analysis of subunit. 2017-05-02 Justin Squirek <squirek@adacore.com> * s-tasren.adb, s-tasini.adb, s-taprop-linux.adb, s-mudido-affinity.adb,, a-exetim-posix.adb, a-direio.adb, g-socket.adb, s-taenca.adb, s-fileio.adb: Remove unused use-type clauses from the runtime. From-SVN: r247465
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 17fd71d..98c893b 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -8770,6 +8770,16 @@ package body Sem_Ch6 is
and then Ekind (Entity (E1)) = E_Discriminant
and then Ekind (Entity (E2)) = E_In_Parameter)
+ -- The discriminant of a protected type is transformed into
+ -- a local constant and then into a parameter of a protected
+ -- operation.
+
+ or else (Ekind (Entity (E1)) = E_Constant
+ and then Ekind (Entity (E2)) = E_In_Parameter
+ and then Present (Discriminal_Link (Entity (E1)))
+ and then Discriminal_Link (Entity (E1)) =
+ Discriminal_Link (Entity (E2)))
+
-- AI12-050: The loop variables of quantified expressions
-- match if they have the same identifier, even though they
-- are different entities.