[Bug middle-end/125854] [17 regression] ICE when building llvm-22.1.8 (fill_block_cache, at gimple-range-cache.cc:1608) since r17-1601

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 18 14:22:16 GMT 2026


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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrew Macleod <amacleod@gcc.gnu.org>:

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

commit r17-1662-g6df88a49e162a971f324247b184ddeb76b115ecc
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Wed Jun 17 16:51:15 2026 -0400

    Do not invoke a different range query from within fold_stmt.

    fold_using_range works on a specified range_query object.  IF this
    object is not the current_range_query (cfun) object, do not invoke
    the general gimple fold routines as they may call into the current
    query.

            PR tree-optimization/125854
            gcc/
            * gimple-range-fold.cc (fold_using_range::fold_stmt): Check if the
            range_query matches the current one before invoking fold.

            gcc/testsuite/
            * g++.dg/pr125854.C: New.


More information about the Gcc-bugs mailing list