https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118684

--- Comment #7 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:7b02b8f65ef60be77f3f93945e2a6b463edaa0aa

commit r15-7264-g7b02b8f65ef60be77f3f93945e2a6b463edaa0aa
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jan 29 08:58:39 2025 +0100

    middle-end/118684 - fix fallout of wrong stack local alignment fix

    When we expand BIT_FIELD_REF <x_2(D), 8, 8> we can end up creating
    a stack local, running into the fix.  But get_object_alignment
    will return 8 for any SSA_NAME because that's not an "object" we
    handle.  Deal with handled components on registers by singling out
    SSA_NAME bases, using their type alignment instead of
    get_object_alignment (I considered "robustifying" get_object_alignment,
    but decided not to at this point).

    This fixes an ICE on gcc.dg/pr41123.c on arm as reported by the CI.

            PR middle-end/118684
            * expr.cc (expand_expr_real_1): When creating a stack local
            during expansion of a handled component, when the base is
            a SSA_NAME use its type alignment and avoid calling
            get_object_alignment.

            * gcc.dg/pr118684.c: Require automatic_stack_alignment.

Reply via email to