https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121527
--- Comment #25 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:1d0a0173cd3e48f1c7c7e98893d440527fc198d0 commit r16-3280-g1d0a0173cd3e48f1c7c7e98893d440527fc198d0 Author: Richard Biener <rguent...@suse.de> Date: Mon Aug 18 13:38:37 2025 +0200 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.