[Ada] Unnesting bugs with array renamings generated for quantified expr
authorGary Dismukes <dismukes@adacore.com>
Mon, 16 Dec 2019 23:43:32 +0000 (18:43 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 2 Jun 2020 08:58:13 +0000 (04:58 -0400)
commit9b95ecdf3dc3faa04c60e8c09f3dafa6e6a1aab1
tree9dea3b593a41ec7c3c016c1b679d91ad7ffa92ed
parent978ca2f5454b3fe88a8046c73a5067564c4f313f
[Ada] Unnesting bugs with array renamings generated for quantified expr

2020-06-02  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

* exp_unst.adb (Visit_Node): When visiting array attribute
nodes, apply Get_Referenced_Object to the attribute prefix, to
handle prefixes denoting renamed objects by picking up the Etype
of the renamed object rather than the possibly unconstrained
nominal subtype of the renaming declaration's Entity.
* sem_util.ads (Get_Referenced_Object): Update comment to
clearly indicate that any kind of node can be passed to this
function.
* sem_util.adb (Get_Referenced_Object): Add test of Is_Object to
the condition, to allow for passing names that denote types and
subtypes.
gcc/ada/exp_unst.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads