diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-05-15 10:35:24 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-09-08 08:58:01 +0200 |
commit | d8ddee60a6dfe75d4815b754fbef9eaecdef9b34 (patch) | |
tree | b0df0278f052caa70ce686ba9147fdb82732a290 | |
parent | e4b99a99802e5fc48a772cae394af4250b68e80d (diff) |
Adds sanity check
-rw-r--r-- | gcc/ipa-escape-analysis.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ipa-escape-analysis.c b/gcc/ipa-escape-analysis.c index 6c4e9105254..cdc249e55fb 100644 --- a/gcc/ipa-escape-analysis.c +++ b/gcc/ipa-escape-analysis.c @@ -787,14 +787,29 @@ collect_types(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); + } + } +} + static unsigned int iphw_execute() { //test_type_equality::run_tests(); //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; |