Fix thinko in operator_bitwise_xor::op1_range
commita8404c07e7fca388c02c39077865f7d5fa928430
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 25 Nov 2022 09:49:20 +0000 (25 10:49 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 25 Nov 2022 09:51:38 +0000 (25 10:51 +0100)
treee64fa3cfbb5b3d5a3bd1138361d55bbf4115cd90
parent2b3a3d7fe3420b6b49810b2a7f5d120c53310335
Fix thinko in operator_bitwise_xor::op1_range

There is a thinko in the op1_range method of ranger's operator_bitwise_xor
class in a boolean context: if the result is known to be true, it may infer
that a specific operand is false without any basis.

gcc/
* range-op.cc (operator_bitwise_xor::op1_range): Fix thinko.

gcc/testsuite/
* gnat.dg/opt100.adb: New test.
* gnat.dg/opt100_pkg.adb, gnat.dg/opt100_pkg.ads: New helper.
gcc/range-op.cc
gcc/testsuite/gnat.dg/opt100.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt100_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt100_pkg.ads [new file with mode: 0644]