https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113979
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:b26501b6e310345ad9f6423b3f8b9df178c5e7d9 commit r11-11272-gb26501b6e310345ad9f6423b3f8b9df178c5e7d9 Author: Eric Botcazou <ebotca...@adacore.com> Date: Thu Mar 7 15:05:54 2024 +0100 Fix bogus error on allocator for array type with Dynamic_Predicate This is a regression present on all active branches: the compiler gives a bogus error on an allocator for an unconstrained array type declared with a Dynamic_Predicate because Apply_Predicate_Check is invoked directly on a subtype reference, which it cannot handle. This moves the check to the resulting access value (after dereference) like in Expand_Allocator_Expression. gcc/ada/ PR ada/113979 * exp_ch4.adb (Expand_N_Allocator): In the subtype indication case, remove call to Apply_Predicate_Check. gcc/testsuite/ * gnat.dg/predicate15.adb: New test.