diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-03-28 21:16:24 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-05-18 08:41:06 +0000 |
commit | ef07419f73ac5cc436282a607591e289bb480626 (patch) | |
tree | ddc910106cfbd5d662de107c7ada26eff6577beb | |
parent | ddb82555b422eb175471a3f4df40b27f872ce9bf (diff) | |
download | gcc-ef07419f73ac5cc436282a607591e289bb480626.tar.gz |
[Ada] Use specific predicate before manipulating BIP_Alloc_Form
For the sake of consistency with other similar manipulations.
gcc/ada/
* exp_ch7.adb (Build_BIP_Cleanup_Stmts): Use Needs_BIP_Alloc_Form.
-rw-r--r-- | gcc/ada/exp_ch7.adb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 74343646515..0c53f326887 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -2850,16 +2850,14 @@ package body Exp_Ch7 is Left_Opnd => New_Occurrence_Of (Fin_Mas_Id, Loc), Right_Opnd => Make_Null (Loc)); - -- For constrained or tagged results escalate the condition to + -- For unconstrained or tagged results, escalate the condition to -- include the allocation format. Generate: -- if BIPallocform > Secondary_Stack'Pos -- and then BIPfinalizationmaster /= null -- then - if not Is_Constrained (Func_Typ) - or else Is_Tagged_Type (Func_Typ) - then + if Needs_BIP_Alloc_Form (Func_Id) then declare Alloc : constant Entity_Id := Build_In_Place_Formal (Func_Id, BIP_Alloc_Form); |