ada: Fix predicate check failure in Expand_Allocator_Expression
commit925f96eab82bad8e237887d5860442d012b68e36
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 17 Nov 2023 10:56:37 +0000 (17 11:56 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 30 Nov 2023 10:12:46 +0000 (30 11:12 +0100)
tree3cccd8e142d7b955ed4feb9cfc4413cce76d40a3
parent2a50a4d4bca09c1c1b255f3ce6c06be57f62889b
ada: Fix predicate check failure in Expand_Allocator_Expression

The For_Special_Return_Object flag needs to be accessed on entry of the
procedure in case the allocator is rewritten during the processing.

gcc/ada/

* exp_ch4.adb (Expand_Allocator_Expression): Add Special_Return
boolean constant to hold the value of For_Special_Return_Object
for the allocator and use it throughout the procedure.
gcc/ada/exp_ch4.adb