[gcc r11-1172] [Ada] Add missing Sloc on new explicit dereferences
Pierre-Marie de Rodat
pmderodat@gcc.gnu.org
Wed Jun 10 13:37:41 GMT 2020
https://gcc.gnu.org/g:5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7
commit r11-1172-g5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 10 12:14:49 2020 +0100
[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.
Diff:
---
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;
More information about the Gcc-cvs
mailing list