https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121527
--- Comment #27 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Richard Biener <[email protected]>: https://gcc.gnu.org/g:96777e13668a829dcbd3c75071b0fcfd7849e649 commit r15-10353-g96777e13668a829dcbd3c75071b0fcfd7849e649 Author: Richard Biener <[email protected]> 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. (cherry picked from commit 1d0a0173cd3e48f1c7c7e98893d440527fc198d0)
