ada: Fix spurious warning on representation clause for private discriminated type
This is the warning enabled by -gnatw.h for holes in record types that are
declared with a representation clause for their components.
When a discriminated type has a private declaration that also declares its
discriminants, the sibling discriminants present on the full declaration
are essentially ignored and, therefore, cannot be used in the computation
performed to give the warning.
gcc/ada/ChangeLog:
* sem_ch13.adb (Record_Hole_Check): Deal consistently with the base
type throughout the processing. Return if its declaration is not a
full type declaration. Assert that its record definition is either
a derived type definition or a record definition. If the type has a
private declaration that does not specify unknown discriminants, use
it as the source of discriminant specifications, if any.
(Check_Component_List): Process every N_Discriminant_Specification
but assert that its defining identifier is really a discriminant.