aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-01-25 11:35:24 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2022-01-26 09:41:58 -0500
commite966a508e03fe28bfca65a1e60e579fa90355ea6 (patch)
treeeee404ca818d8d841e878e152b3719f636904a4e /gcc/builtins.cc
parent192e4a9fa0880ef153631d5b0de864bc4bbb6a91 (diff)
downloadgcc-e966a508e03fe28bfca65a1e60e579fa90355ea6.zip
gcc-e966a508e03fe28bfca65a1e60e579fa90355ea6.tar.gz
gcc-e966a508e03fe28bfca65a1e60e579fa90355ea6.tar.bz2
analyzer: fix sense in range::add_bound [PR94362]
Mikael Morin spotted that I got the sense wrong when discarding redundant constraints in r12-6782-gc4b8f3730a80025192fdb485ad2535c165340e41. Fixed as follows, which also moves the rejection of contradictory constraints in range::add_bound to earlier, so that this code can be self-tested. gcc/analyzer/ChangeLog: PR analyzer/94362 * constraint-manager.cc (range::add_bound): Fix tests for discarding redundant constraints. Perform test for rejecting unsatisfiable constraints earlier so that they don't update the object on failure. (selftest::test_range): New. (selftest::test_constant_comparisons): Add test coverage for existing constraints becoming narrower until they are unsatisfiable. (selftest::run_constraint_manager_tests): Call test_range. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/builtins.cc')
0 files changed, 0 insertions, 0 deletions