[Ada] Ada2020 AI12-0282: Shared variable control aspects in generics

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 9 08:10:06 GMT 2020


This patch refines the checks and the corresponding error messsages on
the legality of instantiations where some formal objects and their
corresponding actuals may carry Atomic, Atonic_Components,  Volatile,
Volatile_Components, Independent, or Independent_Components aspect
specifications. The legality rules require exact match between formal
and actual for the first four aspects, but not for the last two.  For
Atomic_Components and Volatile_Components we also check whether the
actual is of an array type with the corresponding: aspect on its
component type.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-09  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch12.adb (Check_Shared_Variable_Control_Aspects): Require
	exact match between formal and actual for aspects Atomic,
	Atomic_Component, Volatile, and Volatile_Components.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 4512 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200609/10c29900/attachment-0001.bin>


More information about the Gcc-patches mailing list