diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2025-02-11 12:47:36 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2025-06-06 16:44:45 +0200 |
commit | 855fe3625493e3888df5da12aba945c243ec6650 (patch) | |
tree | 9e930641112a39633edc1bd51d5b0fa9fa64c344 /gcc/cppdefault.h | |
parent | 649bde867ae0a808b21e837744211339476c8099 (diff) | |
download | gcc-855fe3625493e3888df5da12aba945c243ec6650.zip gcc-855fe3625493e3888df5da12aba945c243ec6650.tar.gz gcc-855fe3625493e3888df5da12aba945c243ec6650.tar.bz2 |
ada: Fix internal error on allocator involving interface type
The problem is that an itype duplicated through Duplicate_Subexpr_No_Checks
ends up in a different scope than its source. It is fixed by adding a new
formal parameter New_Scope to the function and forwarding it in the call to
the New_Copy_Tree function.
gcc/ada/ChangeLog:
* exp_aggr.adb (Expand_Record_Aggregate): Use the named form for the
second actual parameter in the call to Duplicate_Subexpr.
* exp_attr.adb (Expand_Size_Attribute): Likewise.
* exp_ch5.adb (Expand_Assign_Array): Likewise.
(Expand_Assign_Array_Bitfield): Likewise.
(Expand_Assign_Array_Bitfield_Fast): Likewise.
* exp_util.ads (Duplicate_Subexpr): Add New_Scope formal parameter.
(Duplicate_Subexpr_No_Checks): Likewise.
(Duplicate_Subexpr_Move_Checks): Likewise.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Pass Proc_Id as the
actual for New_Scope in the calls to Duplicate_Subexpr_No_Checks.
(Duplicate_Subexpr): Add New_Scope formal parameter and forward it
in the call to New_Copy_Tree.
(Duplicate_Subexpr_No_Checks): Likewise.
(Duplicate_Subexpr_Move_Checks): Likewise.
Diffstat (limited to 'gcc/cppdefault.h')
0 files changed, 0 insertions, 0 deletions