diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-03-10 12:14:49 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-10 09:35:01 -0400 |
commit | 5c0c89cb163ec78c3dd1ca7cdffe026c706bedd7 (patch) | |
tree | 0b9c8fa664da7e78551acf6ceb4bf7443bb6cbda /gcc | |
parent | f95fb9d019147b2af0c8107d6c6a6e2b6034d9fe (diff) | |
download | gcc-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.adb | 3 |
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; |