summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch6.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-07 12:59:06 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2016-07-07 12:59:06 +0000
commit5842a2886551114b1e3207c717f3334293dfc2ab (patch)
tree2424008a13a9abb7c2ef895df45f86d0050bcde6 /gcc/ada/sem_ch6.adb
parenteeb6872bfdfd1e71b27de6f62a5f5c08a2efb015 (diff)
downloadgcc-5842a2886551114b1e3207c717f3334293dfc2ab.tar.gz
2016-07-07 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Process_Formals): Set ghost flag on formal entities of ghost subprograms. * ghost.adb (Check_Ghost_Context.Is_OK_Ghost_Context): Accept ghost entities in use type clauses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch6.adb')
-rw-r--r--gcc/ada/sem_ch6.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index c9c0f7f4605..dcec1e33d57 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -10975,6 +10975,13 @@ package body Sem_Ch6 is
Set_Etype (Formal, Formal_Type);
+ -- A formal parameter declared within a Ghost region is automatically
+ -- Ghost (SPARK RM 6.9(2)).
+
+ if Ghost_Mode > None then
+ Set_Is_Ghost_Entity (Formal);
+ end if;
+
-- Deal with default expression if present
Default := Expression (Param_Spec);