ada: Fix suboptimal copy of discriminated record to local variable
This happens for a discriminated record type with default discriminants, for
which GNAT allocates mutable objects with the maximum size, while trying not
to copy padding bits unnecessarily. When the padded size is small enough to
be copied efficiently, it should nevertheless be profitable to copy them in
order to avoid a call to memcpy with a dynamic size.
gcc/ada/ChangeLog:
* gcc-interface/trans.cc (gnat_to_gnu): For the LHS of an assignment
or an actual parameter of a call, do not remove the padding even for
a type of self-referential size when the padded size is small enough
to be copied efficiently.