From c81e68a9cdbb5411dce1f1da3b35854212305c7c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 19 Jan 2023 23:26:35 +0100 Subject: value-relation: Fix up relation_union [PR108447] While looking at the PR, I've noticed one row in rr_union_table is wrong. relation_union should be commutative, but due to that bug is not. The following patch adds a self-test for that property (fails without the first hunk) and fixes that line. The actual floating point relation problem isn't fixed by this patch though. 2023-01-19 Jakub Jelinek PR tree-optimization/108447 * value-relation.cc (rr_union_table): Fix VREL_UNDEFINED row order. (relation_tests): Add self-tests for relation_{intersect,union} commutativity. * selftest.h (relation_tests): Declare. * function-tests.cc (test_ranges): Call it. --- gcc/function-tests.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/function-tests.cc') diff --git a/gcc/function-tests.cc b/gcc/function-tests.cc index 846226d..39970b2 100644 --- a/gcc/function-tests.cc +++ b/gcc/function-tests.cc @@ -583,6 +583,7 @@ test_ranges () push_cfun (fun); range_tests (); range_op_tests (); + relation_tests (); build_cfg (fndecl); convert_to_ssa (fndecl); -- cgit v1.1