]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix calc_op1 for undefined op2_range.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Sep 2022 14:27:17 +0000 (10:27 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Sep 2022 18:48:28 +0000 (14:48 -0400)
commita7a6649f4e7c459a95dee1600554ad06aaeb1cf6
treebbdabc2730cb81be7c2803dca5196223fe0b8aa3
parent51ce06385bf259a092f830f1a6dcc4b98757919e
Fix calc_op1 for undefined op2_range.

Unary operations pass the type of operand 1 into op1_range.  If that
range is undefined, the routine blindly picks the type of operand 2,
which in the case of a unary op, does not exist and traps.

* gimple-range-op.cc (gimple_range_op_handler::calc_op1): Use
  operand 1 for second range if there is no operand 2.
gcc/gimple-range-op.cc