[Ada] Incorrect accessibility level on type in formal package
commit7e7d99bfa23c7d84ba48b9131e2134cf4049d791
authorJustin Squirek <squirek@adacore.com>
Fri, 20 Nov 2020 13:11:12 +0000 (20 08:11 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 14 Dec 2020 15:51:54 +0000 (14 10:51 -0500)
tree792a4c3845fc21a11ed92e2cdd934ad2348adff6
parent90b2d3fafb965f1f557966b5842c324d19f5c131
[Ada] Incorrect accessibility level on type in formal package

gcc/ada/

* sem_util.adb, sem_util.ads (In_Generic_Formal_Package):
Created to identify type declarations occurring within generic
formal packages.
* sem_res.adb (Resolve_Allocator): Add condition to avoid
emitting an error for allocators when the type being allocated
is class-wide and from a generic formal package.
gcc/ada/sem_res.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads