]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Fix bogus discriminant check failure for type with predicate
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 22 Jul 2022 14:10:25 +0000 (16:10 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 5 Sep 2022 07:21:04 +0000 (09:21 +0200)
commitbd8405bfbe069763f7de0091c51f9c3000a966d5
tree92f8fc530a1507e76c465ec977bb53126140fae9
parentf3561c06465c9f4110bd483f35b97201825eec44
[Ada] Fix bogus discriminant check failure for type with predicate

This reorders the processing in Freeze_Entity_Checks so that building the
predicate functions, which first requires building discriminated checking
functions for record types with a variant part, is done after processing
and checking this variant part.

gcc/ada/

* sem_ch13.adb (Freeze_Entity_Checks): Build predicate functions
only after checking the variant part of a record type, if any.
gcc/ada/sem_ch13.adb