From 5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 10 Mar 2020 12:14:49 +0100 Subject: [PATCH] [Ada] Add missing Sloc on new explicit dereferences 2020-06-10 Eric Botcazou gcc/ada/ * sem_util.adb (Copy_And_Maybe_Dereference): Temporarily copy the parent node of the original tree when dereferencing. --- gcc/ada/sem_util.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index fe6e8c94200..2b5c211d083 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; -- 2.30.2