diff options
author | Martin Jambor <mjambor@suse.cz> | 2018-05-11 17:55:15 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2018-05-11 17:55:15 +0200 |
commit | 063c5529592955ddb1eee4535e3527215f68bc67 (patch) | |
tree | be0a0f5b8c22e5a0816f37fb8fd7b57ffd2af3e1 /gcc/ipa-cp.c | |
parent | b901c875c96ede54470887bc40d21ba128257951 (diff) | |
download | gcc-063c5529592955ddb1eee4535e3527215f68bc67.zip gcc-063c5529592955ddb1eee4535e3527215f68bc67.tar.gz gcc-063c5529592955ddb1eee4535e3527215f68bc67.tar.bz2 |
Check is_single_const in intersect_with_plats
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
* ipa-cp.c (intersect_with_plats): Check that the lattice contains
single const.
testsuite/
* g++.dg/lto/pr85655_0.C: New test.
From-SVN: r260165
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 4f28a55..e868b9c 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -4127,7 +4127,9 @@ intersect_with_plats (struct ipcp_param_lattices *plats, if (aglat->offset - offset == item->offset) { gcc_checking_assert (item->value); - if (values_equal_for_ipcp_p (item->value, aglat->values->value)) + if (aglat->is_single_const () + && values_equal_for_ipcp_p (item->value, + aglat->values->value)) found = true; break; } |