summaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2025-10-02 06:41:32 +0000
committerMarc Poulhiès <dkm@gcc.gnu.org>2025-11-18 16:05:10 +0100
commitfb97610cfdd26f08915fe083d3ab566c151ba320 (patch)
tree9004a99577e5e6908186d39271bc3192a720895e /libjava/java
parent54afa29ebfaa0fec0de85b1976fa881343762653 (diff)
ada: Enforce checks on access to interface type conversions
The patch enforces checks on access to interface type conversions internally generated by the frontend to displace the pointer to a tagged type object (pointer named "this" in the C++ terminology) from a dispatch table to a another dispatch table. gcc/ada/ChangeLog: * exp_util.ads (Flag_Interface_Pointer_Displacement): New subprogram. * exp_util.adb (Flag_Interface_Pointer_Displacement): Ditto. * exp_attr.adb (Add_Implicit_Interface_Type_Conversion): Flag type conversions internally added to displace the pointer to the object. (Expand_N_Attribute_Reference): Ditto. * exp_ch4.adb (Displace_Allocator_Pointer): Ditto. * exp_ch6.adb (Expand_Simple_Function_Return): Ditto. (Make_Build_In_Place_Call_In_Allocator): Ditto. (Make_CPP_Constructor_Call_In_Allocator): Ditto. * exp_disp.adb (Expand_Interface_Actuals): Ditto. * exp_intr.adb (Expand_Dispatching_Constructor_Call): Ditto. * sem_ch6.adb (Analyze_Function_Return): Ditto. * sem_disp.adb (Propagate_Tag): Ditto. * sem_res.adb (Resolve_Actuals): Ditto. (Valid_Conversion): Rely on the new flag to handle the type conversion as a conversion added to displace the pointer to the object. Factorize code handling general and anonymous access types. * sem_type.adb (Interface_Present_In_Ancestor): For concurrent types add missing handling of class-wide types. Noticed working on this issue. * sinfo.ads (Is_Interface_Pointer_Displacement): Document this new flag. * gen_il-fields.ads (Is_Interface_Pointer_Displacement): New flag. * gen_il-gen-gen_nodes.adb (Is_Interface_Pointer_Displacement): New flag on N_Type_Conversion nodes. * gen_il-internals.adb (Image): Add Is_Interface_Pointer_Displacement flag image.
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions