]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix assertion failure for Finalizable aspect on tagged type
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 1 Jul 2025 17:17:06 +0000 (19:17 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 1 Jul 2025 17:18:46 +0000 (19:18 +0200)
commit8deef83915f9e0fb14f278c68527c95085461c41
treef2382114a7bcf1b726d0fc6d4e46e978422bb49d
parentf471ed487ab36651d48c6c31fb28d36a42a30829
Ada: Fix assertion failure for Finalizable aspect on tagged type

This fixes an assertion failure for the Finalizable aspect applied on a
tagged type with discriminant-dependent component.

gcc/ada/
PR ada/120705
* exp_ch6.adb (Needs_BIP_Collection): Always return False if the
type has relaxed finalization.

gcc/testsuite/
* gnat.dg/specs/finalizable2.ads: New test.
gcc/ada/exp_ch6.adb
gcc/testsuite/gnat.dg/specs/finalizable2.ads [new file with mode: 0644]