]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Use-before-definition of a component of discriminated aggregate's itype.
authorSteve Baird <baird@adacore.com>
Fri, 11 Jul 2025 21:40:59 +0000 (14:40 -0700)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 24 Jul 2025 08:52:37 +0000 (10:52 +0200)
commit1409e64e870a32eedce096d4e800e7a4a2f7ab79
treedc41441af5b83d3ca1bad5ff4c4edc96cc7869b8
parent7572d87ed24737dc7c84c10de4431caf6a9c2d9b
ada: Use-before-definition of a component of discriminated aggregate's itype.

In some cases involving assigning an aggregate to a formal parameter of
an unconstrained discriminated subtype that has a Dynamic_Predicate, and where
the discriminated type also has a component of an unconstrained discriminated
subtype, the front end generates a malformed tree which causes a compilation
failure when the backend fails a consistency check.

gcc/ada/ChangeLog:

* exp_aggr.adb (Convert_To_Assignments): Add calls to Ensure_Defined
before generating assignments to components that could be
associated with a not-yet-defined itype.
gcc/ada/exp_aggr.adb