ada: Fix internal error on class-wide allocator inside if-expression
commitfc48e3b206039b4bc7e636f13a8f65d80d93b2d4
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 12 Dec 2023 17:05:40 +0000 (12 18:05 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 9 Jan 2024 13:13:31 +0000 (9 14:13 +0100)
tree8d0d68642e4dd8300907540d3a1f544841e88fdb
parent4784601d726e5b70b6c4e050c77749706536ccf3
ada: Fix internal error on class-wide allocator inside if-expression

The problem is that the freeze node for the class-wide subtype built for the
expression of the allocator escapes from the dependent expression instead of
being stored in its list of actions.

gcc/ada/

* freeze.adb (Freeze_Expression.Has_Decl_In_List): Deal specifically
with itypes that are class-wide subtypes.
gcc/ada/freeze.adb