aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-03-10 12:14:49 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-10 09:35:01 -0400
commit5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7 (patch)
tree0b9c8fa664da7e78551acf6ceb4bf7443bb6cbda /gcc
parentf95fb9d019147b2af0c8107d6c6a6e2b6034d9fe (diff)
downloadgcc-5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7.zip
gcc-5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7.tar.gz
gcc-5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7.tar.bz2
[Ada] Add missing Sloc on new explicit dereferences
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_util.adb (Copy_And_Maybe_Dereference): Temporarily copy the parent node of the original tree when dereferencing.
Diffstat (limited to 'gcc')
-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;