[Bug tree-optimization/80776] -Wformat-overflow false positive for %d on integer bounded by __builtin_unreachable

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Nov 28 14:58:00 GMT 2017


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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Nov 28 14:58:11 2017
New Revision: 255201

URL: https://gcc.gnu.org/viewcvs?rev=255201&root=gcc&view=rev
Log:
2017-11-28  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/80776
        * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
        Declare.
        * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
        New function.
        (evrp_range_analyzer::record_ranges_from_incoming_edges):
        If the incoming edge is an effective fallthru because the other
        edge only reaches a __builtin_unreachable () then record ranges
        derived from the controlling condition in SSA info.
        (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
        (evrp_range_analyzer::record_ranges_from_stmt): Likewise.

        * gcc.dg/pr80776-1.c: New testcase.
        * gcc.dg/pr80776-2.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/pr80776-1.c
    trunk/gcc/testsuite/gcc.dg/pr80776-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-ssa-evrp-analyze.c
    trunk/gcc/gimple-ssa-evrp-analyze.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c
    trunk/gcc/tree-vrp.h


More information about the Gcc-bugs mailing list