aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index fe6e8c9..2b5c211 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -1355,6 +1355,9 @@ package body Sem_Util is
begin
if Is_Access_Type (Etype (New_N)) then
+ -- Copy the parent to have a proper Sloc on the dereference
+
+ Set_Parent (New_N, Parent (N));
Insert_Explicit_Dereference (New_N);
end if;