aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 245464a..0e09a02 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -273,8 +273,12 @@ package body Sem_Ch5 is
begin
Mark_Coextensions (N, Rhs);
- Analyze (Rhs);
+ -- Analyze the target of the assignment first in case the expression
+ -- contains references to Ghost entities. The checks that verify the
+ -- proper use of a Ghost entity need to know the enclosing context.
+
Analyze (Lhs);
+ Analyze (Rhs);
-- Ensure that we never do an assignment on a variable marked as
-- as Safe_To_Reevaluate.