[Ada] AI12-0211: Consistency of inherited nonoverridable aspects
gcc/ada/
* aspects.ads: Introduce the subtype Nonoverridable_Aspect_Id,
whose Static_Predicate reflects the list of nonoverridable
aspects given in Ada RM 13.1.1(18.7).
* sem_util.ads, sem_util.adb: Add two new visible subprograms,
Check_Inherited_Nonoverridable_Aspects and Is_Confirming. The
former is used to check the consistency of inherited
nonoverridable aspects from multiple sources. The latter
indicates whether two aspect specifications for a nonoverridable
aspect are confirming. Because of compatibility concerns in
compiling QGen, Is_Confirming always returns True if
Relaxed_RM_Semantics (i.e., -gnatd.M) is specified.
* sem_ch3.adb (Derived_Type_Declaration): Call new
Check_Inherited_Nonoverridable_Aspects procedure if interface
list is non-empty.
* sem_ch9.adb (Check_Interfaces): Call new
Check_Inherited_Nonoverridable_Aspects procedure if interface
list is non-empty.
* sem_ch13.adb (Analyze_Aspect_Specifications): When an explicit
aspect specification overrides an inherited nonoverridable
aspect, check that the explicit specification is confirming.