aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/lib-xref-spark_specific.adb
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-11-09 09:47:31 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-11-09 09:47:31 +0000
commit6350cb2aa6949c355b407233766717c229ef623f (patch)
tree41a971c28f58dd598e13fe71d782797eb5b39ec9 /gcc/ada/lib-xref-spark_specific.adb
parent136ca74eb91c225ff18a7b08e0e7fd027b88517c (diff)
downloadgcc-6350cb2aa6949c355b407233766717c229ef623f.zip
gcc-6350cb2aa6949c355b407233766717c229ef623f.tar.gz
gcc-6350cb2aa6949c355b407233766717c229ef623f.tar.bz2
[multiple changes]
2017-11-09 Piotr Trojanek <trojanek@adacore.com> * lib-xref-spark_specific.adb (Add_SPARK_Xrefs): Ignore loop parameters in expression funtions that are expanded into variables. 2017-11-09 Piotr Trojanek <trojanek@adacore.com> * sem_util.adb: Minor whitespace cleanup. 2017-11-09 Jerome Lambourg <lambourg@adacore.com> * libgnarl/s-taprop__qnx.adb: Refine aarch64-qnx. Use the POSIX s-taprop version rather than a custom one. * sigtramp-qnx.c (aarch64-qnx): Implement the signal trampoline. From-SVN: r254563
Diffstat (limited to 'gcc/ada/lib-xref-spark_specific.adb')
-rw-r--r--gcc/ada/lib-xref-spark_specific.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb
index 48bb91d..a30cb84 100644
--- a/gcc/ada/lib-xref-spark_specific.adb
+++ b/gcc/ada/lib-xref-spark_specific.adb
@@ -608,9 +608,11 @@ package body SPARK_Specific is
-- the analysis of the expanded body. We don't lose any globals
-- by discarding them, because such loop parameters can only be
-- accessed locally from within the expression function body.
+ -- Note: some loop parameters are expanded into variables; they
+ -- also must be ignored.
and then not
- (Ekind (Ref.Ent) = E_Loop_Parameter
+ (Ekind_In (Ref.Ent, E_Loop_Parameter, E_Variable)
and then Scope_Within
(Ref.Ent, Unique_Entity (Ref.Ref_Scope))
and then Is_Expression_Function (Ref.Ref_Scope))