[Bug tree-optimization/91597] [9/10 Regression] GCC miscompiles a branch depending on a pointer tag

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 3 16:56:00 GMT 2019


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Sep  3 16:55:31 2019
New Revision: 275345

URL: https://gcc.gnu.org/viewcvs?rev=275345&root=gcc&view=rev
Log:
        PR tree-optimization/91597
        * tree-vrp.c (extract_range_from_binary_expr): Remove unsafe
        BIT_AND_EXPR optimization for pointers, even if both operand
        ranges don't include NULL, the result can be NULL.

        * gcc.c-torture/execute/pr91597.c: New test.

Added:
    branches/gcc-9-branch/gcc/testsuite/gcc.c-torture/execute/pr91597.c
Modified:
    branches/gcc-9-branch/gcc/ChangeLog
    branches/gcc-9-branch/gcc/testsuite/ChangeLog
    branches/gcc-9-branch/gcc/tree-vrp.c


More information about the Gcc-bugs mailing list