diff options
Diffstat (limited to 'gcc/ipa-type-collector.c')
-rw-r--r-- | gcc/ipa-type-collector.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/gcc/ipa-type-collector.c b/gcc/ipa-type-collector.c index 69a3abac95a..2d3a74198c6 100644 --- a/gcc/ipa-type-collector.c +++ b/gcc/ipa-type-collector.c @@ -772,6 +772,21 @@ filter_out_types_in_set(ptrset_t &types) } +static void +sanity_check_ptr_xor_complement(ptrset_t &types) +{ + for (auto i = types.points_to_record.cbegin(); i != types.points_to_record.cend(); ++i) + { + for (auto j = types.complement.cbegin(); j != types.complement.cend(); ++j) + { + const_tree type_ptr = *i; + const_tree type_com = *j; + const bool valid_sets = !eq_type_compare(type_ptr, type_com); + gcc_assert(valid_sets); + } + } +} + void collect_types(ptrset_t &types) { @@ -785,22 +800,9 @@ collect_types(ptrset_t &types) // We still need to collect types from // the function signatures of functions without gimple bodies... } + sanity_check_ptr_xor_complement(types); } -static void -sanity_check_ptr_xor_complement(ptrset_t &types) -{ - for (auto i = types.points_to_record.cbegin(); i != types.points_to_record.cend(); ++i) - { - for (auto j = types.complement.cbegin(); j != types.complement.cend(); ++j) - { - const_tree type_ptr = *i; - const_tree type_com = *j; - const bool valid_sets = !eq_type_compare(type_ptr, type_com); - gcc_assert(valid_sets); - } - } -} static unsigned int iphw_execute() @@ -809,7 +811,6 @@ iphw_execute() //test_naming_types::run_tests(); ptrset_t types; collect_types(types); - sanity_check_ptr_xor_complement(types); filter_out_types_in_set(types); compare_types_in_set(types); return 0; |