ada: Fix spurious error on nested instantiations with generic renaming
The problem is that the renaming slightly changes the form of a global
reference that was saved during the analysis of a generic package, and
that is sufficient to fool the code adjusting global references during
the instantiation.
gcc/ada/
* sem_ch12.adb (Copy_Generic_Node): Test the original node kind
for the sake of consistency. For identifiers and other entity
names and operators, accept an expanded name as associated node.
Replace "or" with "or else" in condtion and fix its formatting.