diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2022-05-13 13:11:18 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2022-05-13 14:38:50 -0400 |
commit | e97e99296505e6015bc9e281364818bb89ca8a49 (patch) | |
tree | 074f420c07e8ab9dc8c6b038b2627025d0689ab0 /gcc/diagnostic-format-json.cc | |
parent | 70d624ff067920d6d57ce5064ddc2a2411377488 (diff) | |
download | gcc-e97e99296505e6015bc9e281364818bb89ca8a49.zip gcc-e97e99296505e6015bc9e281364818bb89ca8a49.tar.gz gcc-e97e99296505e6015bc9e281364818bb89ca8a49.tar.bz2 |
Check operand for type, not LHS.
When folding, the LHS has not been set, so we should be checking the type of
op1. We should also make sure op1 is not undefined.
PR tree-optimization/105597
gcc/
* range-op.cc (operator_minus::lhs_op1_relation): Use op1 instead
of the lhs and make sure it is not undefined.
gcc/testsuite/
* gcc.dg/pr105597.c: New.
Diffstat (limited to 'gcc/diagnostic-format-json.cc')
0 files changed, 0 insertions, 0 deletions