Skip to content
Snippets Groups Projects
Commit eceb45bb authored by Richard Wai's avatar Richard Wai Committed by Marc Poulhiès
Browse files

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: default avatarRichard Wai <richard@annexi-strayline.com>
parent 5b945243
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment