]> 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:19:23 +0000 (19:19 +0200)
commit79b82eb732765507367bb26fcd86c526599e3082
treee945fd2b50e9e0ac90d36e7c67345435e2914d3e
parent7fdf47538a659f6af8dadbecbb63c8a226b63754
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]