❌ About FreshRSS

Normal view

There are new articles available, click to refresh the page.
Before yesterdayChange logs

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]>
  • [DBH] gcc/ada/exp_ch3.adb
  • [DBH] gcc/ada/exp_ch7.adb
  • 17 September 2023 at 15:00

ada: Private extensions with the keyword "synchronized" are always limited.

9 August 2023 at 05:54
ada: Private extensions with the keyword "synchronized" are always limited.

GNAT was relying on synchronized private type extensions deriving from a
concurrent interface to determine its limitedness. This does not cover the case
where such an extension derives a limited interface. RM-7.6(6/2) makes is clear
that "synchronized" in a private extension implies the derived type is limited.
GNAT should explicitly check for the presence of "synchronized" in a private
extension declaration, and it should have the same effect as the presence of
β€œlimited”.

gcc/ada/ChangeLog:

	* sem_ch3.adb (Build_Derived_Record_Type): Treat presence of
	keyword "synchronized" the same as "limited" when determining if a
	private extension is limited.

gcc/testsuite/ChangeLog:

	* gnat.dg/sync_tag_discriminals.adb: New test.
	* gnat.dg/sync_tag_limited.adb: New test.

Signed-off-by: Richard Wai <[email protected]>
  • [DBH] gcc/ada/sem_ch3.adb
  • 9 August 2023 at 05:54
❌
❌