[Ada] Legality rule on ancestors of type extensions in generic bodies
This patch adds an RM reference for the rule that in a generic body a
type extension cannot have ancestors that are generic formal types. The
patch also extends the check to interface progenitors that may appear in
a derived type declaration or private extension declaration.
2019-08-13 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_ch3.adb (Check_Generic_Ancestor): New subprogram,
aubsidiary to Build_Derived_Record_Type. to enforce the rule
that a type extension declared in a generic body cznnot have an
ancestor that is a generic formal (RM 3.9.1 (4/2)). The rule
applies to all ancestors of the type, including interface
progenitors.
gcc/testsuite/
* gnat.dg/tagged4.adb: New testcase.
From-SVN: r274358