[Ada] AI12-0282: shared variable control aspects on formal types
commit64c6e3673a9eddf168fbe8d5cfab70f55fea08f8
authorEd Schonberg <schonberg@adacore.com>
Wed, 18 Dec 2019 07:14:54 +0000 (18 07:14 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 18 Dec 2019 07:14:54 +0000 (18 07:14 +0000)
tree60d308f2111b2998bf13f5ee7dd243a0cc1d958b
parent2b0451b77242d8071aa3c2b077deb84c17170223
[Ada] AI12-0282: shared variable control aspects on formal types

2019-12-18  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* par-ch12.adb (P_Formal_Derived_Type_Definition): In Ada_2020
the keyword WITH can indicate the start of aspect specifications
and not a private type extension.
* sem_ch12.adb (Analyze_Formal_Type): Indicate that it is a
first subtype.
(Instantiate_Type): New procedure
Check_Shared_Variable_Control_Aspects to verify matching rules
between formal and actual types. Note that an array type with
aspect Atomic_Components is considered compatible with an array
type whose component type is Atomic, even though the array types
do not carry the same aspect.
* sem_ch13.adb (Analyze_One_Aspect): Allow shared variable
control aspects to appear on formal types.
(Rep_Item_Too_Early): Exclude aspects on formal types.
* sem_prag.adb (Mark_Type): Handle properly pragmas that come
from aspects on formal types.
(Analyze_Pragma, case Atomic_Components): Handle formal types.

From-SVN: r279512
gcc/ada/ChangeLog
gcc/ada/par-ch12.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb