aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ghost.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/ghost.adb')
-rw-r--r--gcc/ada/ghost.adb8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb
index e7a55ef..d49d94d 100644
--- a/gcc/ada/ghost.adb
+++ b/gcc/ada/ghost.adb
@@ -740,6 +740,14 @@ package body Ghost is
then
return True;
+ -- It is always legal to use a ghost prefix. More complex
+ -- scenarios are analyzed for the selector.
+
+ elsif Nkind (Par) = N_Selected_Component
+ and then Prefix (Par) = Prev
+ then
+ return True;
+
elsif Is_OK_Declaration (Par) then
return True;