[Bug tree-optimization/120358] [14 regression] qtbase-6.9.0 miscompiled since r15-580-gf3e5f4c58591f5

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 14 13:26:52 GMT 2025


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

--- Comment #41 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:6f99989ed7e2540a900d6431f9e477d427aef446

commit r14-12077-g6f99989ed7e2540a900d6431f9e477d427aef446
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jul 7 15:13:38 2025 +0200

    tree-optimization/120358 - bogus PTA with structure access

    When we compute the constraint for something like
    MEM[(const struct QStringView &)&tok2 + 32] we go and compute
    what (const struct QStringView &)&tok2 + 32 points to and then
    add subvariables to its dereference that possibly fall in the
    range of the access according to the original refs size.  In
    doing that we disregarded that the subvariable the starting
    address points to might not be aligned to it and thus the
    access might start at any point within that variable.  The following
    conservatively adjusts the pruning of adjacent sub-variables to
    honor this.

            PR tree-optimization/120358
            * tree-ssa-structalias.cc (get_constraint_for_1): Adjust
            pruning of sub-variables according to the imprecise
            known start offset.

    (cherry picked from commit aa5ae523e84a97bf3a582ea0fa73d959afa9b9c7)


More information about the Gcc-bugs mailing list