aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-12-07 17:26:27 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-01-03 10:29:53 +0100
commit83d52e6de23f65cefde615183cdef1eb94d18b1f (patch)
tree1ced4614e9f0c0565dc6708b7c356e73096d7cbd /gcc/fold-const.cc
parent1fc93c2437dd3bc5cfd19b1397b9b0ca4c5f4064 (diff)
downloadgcc-83d52e6de23f65cefde615183cdef1eb94d18b1f.zip
gcc-83d52e6de23f65cefde615183cdef1eb94d18b1f.tar.gz
gcc-83d52e6de23f65cefde615183cdef1eb94d18b1f.tar.bz2
ada: Make Sem_Util.Is_Aliased_View predicate more robust
The predicate implements the rules of the language so it needs to cope with constructs rewritten by the expander, in particular explicit dereferences that the expander uses liberally for various purposes. This change makes the detection of rewritten calls more robust, plugging an existing loophole for specific objects and exposing a missing propagation of the Is_Aliased flag for certain build-in-place objects, as well as adds the detection of rewritten return objects. It also contains a small enhancement to Set_Debug_Info_Defining_Id aimed at making it easier to debug the generated code by means of -gnatD. gcc/ada/ * sem_util.ads (Set_Debug_Info_Defining_Id): Adjust comment. * sem_util.adb (Is_Aliased_View) <N_Explicit_Dereference>: Return false for more artificial dereferences generated by the expander. (Set_Debug_Info_Defining_Id): Set Debug_Info_Needed unconditionally in -gnatD mode. * exp_ch6.adb (Replace_Renaming_Declaration_Id): Also preserve the Is_Aliased flag.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions