When attribute Valid is applied to a private type, we used the signedness of
its implementation base type which wrongly included negative values.
gcc/ada/ChangeLog:
* exp_attr.adb (Expand_N_Attribute_Reference): When expanding attribute
Valid, use signedness from the validated view, not from its base type.
else
declare
Uns : constant Boolean :=
- Is_Unsigned_Type (Ptyp)
- or else (Is_Private_Type (Ptyp)
- and then Is_Unsigned_Type (PBtyp));
+ Is_Unsigned_Type (Validated_View (Ptyp));
+
Size : Uint;
P : Node_Id := Pref;