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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <[email protected]>:

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

commit r16-4948-ga0cc9450a03bb7ef716e4d3734786ea920a35fe8
Author: Tamar Christina <[email protected]>
Date:   Mon Nov 3 08:07:13 2025 +0000

    vect: Fix null dereference in boolean reductions [PR122475]

    neutral_op can be null, so guard against that.

    gcc/ChangeLog:

            PR tree-optimization/122475
            * tree-vect-loop.cc (vectorizable_reduction): Check for neutral_op.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/122475
            * gcc.dg/vect/pr122475.c: New test.
            * gcc.target/aarch64/sve/vect-reduc-bool-19.c: New test.
            * gcc.target/aarch64/sve/vect-reduc-bool-20.c: New test.

Reply via email to