tree-optimization/121527 - wrong SRA with aggregate copy

SRA handles outermost VIEW_CONVERT_EXPRs but it wrongly ignores
those when building an access which leads to the wrong size
used when the VIEW_CONVERT_EXPR does not have the same size as
its operand which is valid GENERIC and is used by Ada upcasting.

	PR tree-optimization/121527
	* tree-sra.cc (build_access_from_expr_1): Do not strip an
	outer VIEW_CONVERT_EXPR as it's relevant for the size of
	the access.
	(get_access_for_expr): Likewise.

(cherry picked from commit 1d0a0173cd3e48f1c7c7e98893d440527fc198d0)
1 file changed