https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83188
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:c14a1ed99c380ae7f812932d8e8f5152bb6c1c19 commit r16-5082-gc14a1ed99c380ae7f812932d8e8f5152bb6c1c19 Author: Eric Botcazou <[email protected]> Date: Fri Nov 7 20:42:57 2025 +0100 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.
