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

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

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

commit r16-48-gd508d24282c6a8172be2abcb2223232f452b667f
Author: Andrew Pinski <quic_apin...@quicinc.com>
Date:   Thu Jan 9 12:53:27 2025 -0800

    Add assert to array_slice::begin/end

    So while debugging PR 118320, I found it was useful to have
    an assert inside array_slice::begin/end that the array slice isvalid
    rather than getting an segfault. This adds an assert that is only
    enabled for checking.

    OK? Bootstrapped and tested on x86_64-linux-gnu.

    gcc/ChangeLog:

            * vec.h (array_slice::begin): Assert that the
            slice is valid.
            (array_slice::end): Likewise.

    Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>

Reply via email to