[Bug tree-optimization/125776] [15/16/17 Regression] compare debug fail building gettext/intl on x86_64 / aarch64 since r17-1507 (and since r15-4503)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jun 13 21:09:57 GMT 2026


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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:a4afea80fce5f1aafdd1174e48e9ebfc9ec8155d

commit r17-1537-ga4afea80fce5f1aafdd1174e48e9ebfc9ec8155d
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date:   Sat Jun 13 09:38:08 2026 -0700

    phiopt: Fix is_factor_profitable for debug stmts [PR125776]

    This is a latent bug in is_factor_profitable where we would
    consider a debug statement as an use for lifetime usage
    afterwards. So you would get a compare debug failure in some
    cases. pr125776-2.c fails since r15-4503-g8d6d6d537fdc75.

    Pushed as obvious after a bootstrap/test.

            PR tree-optimization/125776

    gcc/ChangeLog:

            * tree-ssa-phiopt.cc (is_factor_profitable): An
            usage in a debug stmt should be ignored.

    gcc/testsuite/ChangeLog:

            * gcc.dg/torture/pr125776-1.c: New test.
            * gcc.dg/torture/pr125776-2.c: New test.

    Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>


More information about the Gcc-bugs mailing list