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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <al...@gcc.gnu.org>:

https://gcc.gnu.org/g:2615502971ca11c15f1949c03d93ccfe1ce54f55

commit r13-1840-g2615502971ca11c15f1949c03d93ccfe1ce54f55
Author: Aldy Hernandez <al...@redhat.com>
Date:   Tue Jul 26 11:03:17 2022 +0200

    Handle non constant ranges in irange pretty printer.

    Technically iranges only exist in constant form, but we allow symbolic
    ones before arriving in the ranger, so legacy VRP can work.  This fixes the
    ICE when attempting to print symbolic iranges in the pretty printer.

    For consistency's sake, I have made sure irange::get_nonzero_bits does
    not similarly ICE on a symbolic range, even though no one should be
    querying nonzero bits on such a range.  This should all melt away
    when legacy disappears, because all these methods are slated for
    removal (min, max, kind, symbolic_p, constant_p, etc).

    Finally, Richi suggested using pp_wide_int in the pretty printer
    instead of going through trees.  I've adapted a test, since
    dump_generic_node seems to work slightly different.

            PR tree-optimization/106444

    gcc/ChangeLog:

            * value-range-pretty-print.cc (vrange_printer::visit): Handle
            legacy ranges.
            (vrange_printer::print_irange_bound): Work on wide_int's.
            * value-range-pretty-print.h (print_irange_bound): Same.
            * value-range.cc (irange::get_nonzero_bits): Handle legacy ranges.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/evrp4.c: Adjust.

Reply via email to