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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:90d3b4dd84c08cc134578397d9c6b30b7dc4b440

commit r11-10305-g90d3b4dd84c08cc134578397d9c6b30b7dc4b440
Author: Richard Biener <rguent...@suse.de>
Date:   Tue Jul 19 09:57:22 2022 +0200

    middle-end/106331 - fix mem attributes for string op arguments

    get_memory_rtx tries hard to come up with a MEM_EXPR to record
    in the memory attributes but in the last fallback fails to properly
    account for an unknown offset and thus, as visible in this testcase,
    incorrect alignment computed from set_mem_attributes.  The following
    rectifies both parts.

            PR middle-end/106331
            * builtins.c (get_memory_rtx): Compute alignment from
            the original address and set MEM_OFFSET to unknown when
            we create a MEM_EXPR from the base object of the address.

            * gfortran.dg/pr106331.f90: New testcase.

    (cherry picked from commit e4ff11a8f2e80adb8ada69bf35ee6a1ab18a9c85)

Reply via email to