ada: Change 'Size of formal unconstrained discriminated in out parameters
When the discriminated type is declared with default discriminants, it is
definite, so objects of the type can be declared without constraints, are
thus unconstrained, and are allocated with the maximum size by GNAT.
When these objects are passed as actuals of formal in out parameters, it
makes sense for the 'Size computed for them from within the subprogram to
also be the above "unconstrained" size instead of the "constrained" size
computed from the value of the discriminants present in them.
gcc/ada/ChangeLog:
* exp_attr.adb (Expand_Size_Attribute): If the attribute is applied
to a formal parameter allocated with an extra Constrained parameter,
use the value of the latter to choose between the "unconstrained" or
the "constrained" size of the formal parameter.