Don't assert on a negative shift.
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 16 Oct 2020 19:02:42 +0000 (15:02 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 16 Oct 2020 19:05:11 +0000 (15:05 -0400)
commit4a135bd987e7bff6d3b94efa085e0c246348b486
tree2b9ce23bed5a4a1e81d411e70ffa119a934f2e7c
parentccb4f20cbee1756c464033bbdda2f27b6aa2a63f
Don't assert on a negative shift.

Don't assert, simply Return false for negative shifts as we can't tell
anything about the operand.

PR tree-optimization/97462
gcc/
* range-op.cc (operator_lshift::op1_range): Don't trap on negative
shifts.
gcc/testsuite/
* gcc.dg/pr97462.c: New file.
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr97462.c [new file with mode: 0644]