aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-03-07 15:05:54 +0100
committerEric Botcazou <ebotcazou@adacore.com>2024-03-07 15:08:28 +0100
commite71a4e81729516eed8782a255ff37617e6fd4b69 (patch)
treea6742d6e025673ab2d40abe584e7b4f788ba516e /gcc/c
parent9970b576b7e4ae337af1268395ff221348c4b34a (diff)
downloadgcc-e71a4e81729516eed8782a255ff37617e6fd4b69.zip
gcc-e71a4e81729516eed8782a255ff37617e6fd4b69.tar.gz
gcc-e71a4e81729516eed8782a255ff37617e6fd4b69.tar.bz2
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, call Apply_Predicate_Check on the resulting access value if needed. gcc/testsuite/ * gnat.dg/predicate15.adb: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions