[Bug tree-optimization/108385] [12 Regression] false positive -Wfree-nonheap-object

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 31 14:58:12 GMT 2023


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

--- Comment #9 from CVS 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:1626ec53e8c1b9c245572417d380e3ed84990cff

commit r13-5579-g1626ec53e8c1b9c245572417d380e3ed84990cff
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Tue Jan 17 11:39:47 2023 -0500

    Add op2_range to pointer_plus.

    Implement op2_range for pointer_plus to determine the offset (operand 2) is
    zero or non-zero based on equality/inequality between the LHS and op1.
    Also allow GORI computations to continue if the LHS is VARYING and there
    is also a relation.

            PR tree-optimization/108385
            gcc/
            * gimple-range-gori.cc (gori_compute::compute_operand_range):
            Allow VARYING computations to continue if there is a relation.
            * range-op.cc (pointer_plus_operator::op2_range): New.

            gcc/testsuite/
            * gcc.dg/pr108385.c: New.


More information about the Gcc-bugs mailing list