This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Attach the special GNATprove HEAP entity to the Standard package
- From: Pierre-Marie de Rodat <derodat at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Piotr Trojanek <trojanek at adacore dot com>
- Date: Tue, 17 Jul 2018 04:22:07 -0400
- Subject: [Ada] Attach the special GNATprove HEAP entity to the Standard package
In GNATprove mode we use frontend cross-references to synthesize the
Global contract of subprograms with SPARK_Mode => Off and represent
a read/write via a pointer as a read/write of a special entity called
HEAP. This entity is now attached to the Standard package, so that we can
safely check the Ekind of its Scope, which now happens in Scope_Within.
This only affects GNATprove, so no frontend test provided.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to
the Standard package.
--- gcc/ada/lib-xref-spark_specific.adb
+++ gcc/ada/lib-xref-spark_specific.adb
@@ -287,6 +287,7 @@ package body SPARK_Specific is
Set_Ekind (Heap, E_Variable);
Set_Is_Internal (Heap, True);
+ Set_Scope (Heap, Standard_Standard);
Set_Has_Fully_Qualified_Name (Heap);
end Create_Heap;