[Ada] Fix assertion failure on double rederivation of private type
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 31 Jan 2020 10:56:30 +0000 (11:56 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 5 Jun 2020 12:17:40 +0000 (08:17 -0400)
commitbec136971a7a45de978c398b5ecaaea9d73eb501
tree5ee620569a7ddf4590c8a6c25ee9a3f1bf256571
parente0fd1b9c9d906f9693bb4e7d56a37ec5adf4bc0a
[Ada] Fix assertion failure on double rederivation of private type

2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch3.adb (Available_Full_View): New function returning
either the full or the underlying full view.
(Build_Full_Derivation): Add guard for the full view.
(Copy_And_Build): Retrieve the underlying full view, if any,
also if deriving a completion.
(Build_Derived_Private_Type): Use Available_Full_View throughout
to decide whether a full derivation must be done.
gcc/ada/sem_ch3.adb