[Ada] Fix internal error on double renaming of private constant
commitef12e74ce7b1b00cce13d27e1273656926a4a25d
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 16 Aug 2022 15:54:59 +0000 (16 17:54 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 6 Sep 2022 07:14:23 +0000 (6 09:14 +0200)
tree183ec421e996f3b726fd5d286355b121a0fa5703
parente2909e105d26a13b860d071f7491923f318f999c
[Ada] Fix internal error on double renaming of private constant

The first renaming uses the type of the full view of the constant but not
the second, which introduces problematic view conversions downstream.

gcc/ada/

* gcc-interface/trans.cc (Full_View_Of_Private_Constant): New
function returning the Full_View of a private constant, after
looking through a chain of renamings, if any.
(Identifier_to_gnu): Call it on the entity.  Small cleanup.
gcc/ada/gcc-interface/trans.cc