ada: TSS finalize address subprogram generation for constrained...
17 September 2023 at 15:00
ada: TSS finalize address subprogram generation for constrained... ...subtypes of unconstrained synchronized private extensions should take care to designate the corresponding record of the underlying concurrent type. When generating TSS finalize address subprograms for class-wide types of constrained root types, it follows the parent chain looking for the first "non-constrained" type. It is possible that such a type is a private extension with the βsynchronizedβ keyword, in which case the underlying type is a concurrent type. When that happens, the designated type of the finalize address subprogram should be the corresponding recordβs class-wide-type. gcc/ada/ChangeLog: * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Expanded comments explaining why TSS Finalize_Address is not generated for concurrent class-wide types. * exp_ch7.adb (Make_Finalize_Address_Stmts): Handle cases where the underlying non-constrained parent type is a concurrent type, and adjust the designated type to be the corresponding recordβs class-wide type. gcc/testsuite/ChangeLog: * gnat.dg/sync_tag_finalize.adb: New test. Signed-off-by: Richard Wai <[email protected]>