[Ada] Premature freezing of types
authorArnaud Charlet <charlet@adacore.com>
Fri, 19 Mar 2021 07:54:38 +0000 (03:54 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 18 Jun 2021 08:36:52 +0000 (04:36 -0400)
commit4edcee5b2bf6ca2c0f7dcf5edcbe6daf715fc26a
tree48c0a2969337c977ad99871cd42d99880d2a2d0a
parent33a3b5f3a5034c3b41bd34fdf145da9a20743a28
[Ada] Premature freezing of types

gcc/ada/

* exp_ch4.adb (Expand_N_Quantified_Expression): Ensure the type
of the name of a "for of" loop is frozen.
* exp_disp.adb (Check_Premature_Freezing): Complete condition to
take into account a private type completed by another private
type now that the freezing rule are better implemented.
* freeze.adb (Freeze_Entity.Freeze_Profile): Do not perform an
early freeze on types if not in the proper scope. Special case
expression functions that requires access to the dispatch table.
(Should_Freeze_Type): New.
* sem_ch13.adb (Resolve_Aspect_Expressions): Prevent assert
failure in case of an invalid tree (previous errors detected).
* sem_res.adb (Resolve): Remove kludge related to entities
causing incorrect premature freezing.
* sem_util.adb (Ensure_Minimum_Decoration): Add protection
against non base types.
gcc/ada/exp_ch4.adb
gcc/ada/exp_disp.adb
gcc/ada/freeze.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb