On 12/23/22 08:44, Martin Liška wrote:
Hi.

We reach cond_expr and then we get an ICE in tree_int_cst_lt.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

        PR tree-optimization/108137

gcc/ChangeLog:

        * tree-ssa-strlen.cc (get_range_strlen_phi): Reject anything
        different from INTEGER_CST.

gcc/testsuite/ChangeLog:

        * gcc.dg/tree-ssa/pr108137.c: New test.
OK. You could perhaps do better by looking at the arms of the COND_EXPR, but this seems like the safest thing to do for gcc-13.

jeff

Reply via email to