Ada: Fix bogus error on inherited operation for extension of type instance
It comes from a small discrepancy between class-wide subtypes and types:
they both have unknown discriminants, but only the latter may have
discriminants, which causes Subtypes_Statically_Match to return False.
gcc/ada/
PR ada/83188
* sem_eval.adb (Subtypes_Statically_Match): Deal with class-wide
subtypes whose class-wide types have discriminants.
gcc/testsuite/
* gnat.dg/class_wide6.ads, gnat.dg/class_wide6.adb: New test.
* gnat.dg/class_wide6_pkg.ads: New helper.