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

--- Comment #8 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:075ddb5226c40c4d86ab56b7788882822fb6494e

commit r15-7407-g075ddb5226c40c4d86ab56b7788882822fb6494e
Author: Alexandre Oliva <ol...@adacore.com>
Date:   Fri Feb 7 08:30:47 2025 -0300

    [ifcombine] avoid creating out-of-bounds BIT_FIELD_REFs [PR118514]

    If decode_field_reference finds a load that accesses past the inner
    object's size, bail out.

    Drop the too-strict assert.


    for  gcc/ChangeLog

            PR tree-optimization/118514
            PR tree-optimization/118706
            * gimple-fold.cc (decode_field_reference): Refuse to consider
            merging out-of-bounds BIT_FIELD_REFs.
            (make_bit_field_load): Drop too-strict assert.
            * tree-eh.cc (bit_field_ref_in_bounds_p): Rename to...
            (access_in_bounds_of_type_p): ... this.  Change interface,
            export.
            (tree_could_trap_p): Adjust.
            * tree-eh.h (access_in_bounds_of_type_p): Declare.

    for  gcc/testsuite/ChangeLog

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

Reply via email to