aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 04db9b0..530fd00 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -7200,12 +7200,15 @@ package body Sem_Ch4 is
-- For cross-reference purposes, treat the new node as being in
-- the source if the original one is. Set entity and type, even
-- though they may be overwritten during resolution if overloaded.
+ -- Perform the same transformation in ASIS mode, because during
+ -- pre-analysis of a pre/post condition the node will not be
+ -- rewritten as a call.
Set_Comes_From_Source (Subprog, Comes_From_Source (N));
Set_Comes_From_Source (Call_Node, Comes_From_Source (N));
if Nkind (N) = N_Selected_Component
- and then not Inside_A_Generic
+ and then (not Inside_A_Generic or ASIS_Mode)
then
Set_Entity (Selector_Name (N), Entity (Subprog));
Set_Etype (Selector_Name (N), Etype (Entity (Subprog)));