From 81babdfc55c43dcfeccabaca420fe77cd108dee5 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 5 Jun 2020 14:43:10 -0400 Subject: [PATCH 207/315] FIXME: reenable test_compound_assignment --- gcc/analyzer/region-model2.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc index 7eef3037393..dcd8bf03c0a 100644 --- a/gcc/analyzer/region-model2.cc +++ b/gcc/analyzer/region-model2.cc @@ -8808,13 +8808,12 @@ test_assignment () #endif } -#if 0 /* Verify that compound assignments work as expected. */ static void test_compound_assignment () { - coord_test ct; + coord_test2 ct; tree c = build_global_decl ("c", ct.m_coord_type); tree c_x = build3 (COMPONENT_REF, TREE_TYPE (ct.m_x_field), @@ -8830,20 +8829,22 @@ test_compound_assignment () tree int_17 = build_int_cst (integer_type_node, 17); tree int_m3 = build_int_cst (integer_type_node, -3); - region_model2 model; + region_model2_manager mgr; + region_model2 model (&mgr); model.set_value (c_x, int_17, NULL); model.set_value (c_y, int_m3, NULL); +#if 0 ASSERT_DUMP_EQ (model, true, "c.x: 17, c.y: -3"); +#endif /* Copy c to d. */ - model.copy_region2 (model.get_lvalue (d, NULL), model.get_lvalue (c, NULL), + model.copy_region (model.get_lvalue (d, NULL), model.get_lvalue (c, NULL), NULL); /* Check that the fields have the same svalue2s. */ ASSERT_EQ (model.get_rvalue (c_x, NULL), model.get_rvalue (d_x, NULL)); ASSERT_EQ (model.get_rvalue (c_y, NULL), model.get_rvalue (d_y, NULL)); } -#endif /* Verify the details of pushing and popping stack frames. */ -- 2.26.2