aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-cp.cc')
-rw-r--r--gcc/ipa-cp.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index 1f5e0e1..8cd0fa2 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -1040,9 +1040,16 @@ ipcp_vr_lattice::meet_with_1 (const value_range *other_vr)
if (other_vr->varying_p ())
return set_to_bottom ();
- value_range save (m_vr);
- m_vr.union_ (*other_vr);
- return m_vr != save;
+ bool res;
+ if (flag_checking)
+ {
+ value_range save (m_vr);
+ res = m_vr.union_ (*other_vr);
+ gcc_assert (res == (m_vr != save));
+ }
+ else
+ res = m_vr.union_ (*other_vr);
+ return res;
}
/* Return true if value range information in the lattice is yet unknown. */