diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-08 11:38:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-09-08 11:38:48 +0200 |
commit | 3815f967f9fa3655ee4e9cdc44d6292e09f411de (patch) | |
tree | 7019b196e6d5c8513a426a8b9ba493eb506f4f11 /gcc/ada/lib-xref-spark_specific.adb | |
parent | a481c9b40f0de76bf9e86b9aba7c1fe66cd7add0 (diff) | |
download | gcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.zip gcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.tar.gz gcc-3815f967f9fa3655ee4e9cdc44d6292e09f411de.tar.bz2 |
[multiple changes]
2017-09-08 Bob Duff <duff@adacore.com>
* s-trasym.ads (Hexa_Traceback): If
Suppress_Hex is True, print "..." instead of a hexadecimal
address.
* s-trasym.adb: Ignore No_Hex in this version.
Misc cleanup.
2017-09-08 Bob Duff <duff@adacore.com>
* debug.adb: Minor reformatting.
2017-09-08 Bob Duff <duff@adacore.com>
* a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
code so it doesn't trigger an "uninit var" warning.
2017-09-08 Nicolas Roche <roche@adacore.com>
* s-hibaen.ads: Remove obsolete file.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* a-locale.ads: Add comment explaining the state of this package.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Is_CCT_Instance): Allow calls in the context
of packages.
* sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
allow calls in the context of package spec (for pragma
Initializes) and bodies (for pragma Refined_State).
2017-09-08 Bob Duff <duff@adacore.com>
* checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
new Exp.
From-SVN: r251875
Diffstat (limited to 'gcc/ada/lib-xref-spark_specific.adb')
-rw-r--r-- | gcc/ada/lib-xref-spark_specific.adb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref-spark_specific.adb b/gcc/ada/lib-xref-spark_specific.adb index b627a8e..f210112 100644 --- a/gcc/ada/lib-xref-spark_specific.adb +++ b/gcc/ada/lib-xref-spark_specific.adb @@ -738,6 +738,19 @@ package body SPARK_Specific is and then Get_Scope_Num (Ref.Ent_Scope) /= No_Scope and then Get_Scope_Num (Ref.Ref_Scope) /= No_Scope + + -- Discard references to loop parameters introduced within + -- expression functions, as they give two references: one from + -- the analysis of the expression function itself and one from + -- 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. + + and then not + (Ekind (Ref.Ent) = E_Loop_Parameter + and then Scope_Within + (Ref.Ent, Unique_Entity (Ref.Ref_Scope)) + and then Is_Expression_Function (Ref.Ref_Scope)) then Nrefs := Nrefs + 1; Rnums (Nrefs) := Index; |