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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aol...@gcc.gnu.org>:

https://gcc.gnu.org/g:3f05d70389f523cf53f9b8fdf56570e8a6ecdb8b

commit r15-7171-g3f05d70389f523cf53f9b8fdf56570e8a6ecdb8b
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Thu Jan 23 23:23:10 2025 -0300

    [ifcombine] out-of-bounds bitfield refs can trap [PR118514]

    Check that BIT_FIELD_REFs of DECLs are in range before deciding they
    don't trap.

    Check that a replacement bitfield load is as trapping as the replaced
    load.


    for  gcc/ChangeLog

            PR tree-optimization/118514
            * tree-eh.cc (bit_field_ref_in_bounds_p): New.
            (tree_could_trap_p) <BIT_FIELD_REF>: Call it.
            * gimple-fold.cc (make_bit_field_load): Check trapping status
            of replacement load against original load.

    for  gcc/testsuite/ChangeLog

            PR tree-optimization/118514
            * gcc.dg/field-merge-23.c: New.

Reply via email to