[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.