Commit 063c5529 by Martin Jambor Committed by Martin Jambor

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
parent b901c875
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
* ipa-cp.c (intersect_with_plats): Check that the lattice contains
single const.
2018-05-11 Richard Earnshaw <rearnsha@arm.com> 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
PR target/85733 PR target/85733
......
...@@ -4127,7 +4127,9 @@ intersect_with_plats (struct ipcp_param_lattices *plats, ...@@ -4127,7 +4127,9 @@ intersect_with_plats (struct ipcp_param_lattices *plats,
if (aglat->offset - offset == item->offset) if (aglat->offset - offset == item->offset)
{ {
gcc_checking_assert (item->value); 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; found = true;
break; break;
} }
......
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
* g++.dg/lto/pr85655_0.C: New test.
2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com> 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
* gcc.target/i386/tpause-1.c: New test. * gcc.target/i386/tpause-1.c: New test.
......
// { dg-lto-do link }
// { dg-require-effective-target shared }
// { dg-require-effective-target fpic }
// { dg-lto-options {{-O2 -fPIC -shared -flto}} }
int a;
void b(...);
void c(int);
enum { d, e, f, g, h, i, j, k };
class l {
public:
int ac;
bool m;
l(char *);
int n();
};
struct o {
int ad;
o(int p = 0) : ad(p) {}
};
class C : public l {
public:
char q;
C(o) : l(&q) { m |= ac & a ?: 9; }
};
class r : C {
public:
char s;
r(o p, char) : C(p) {
if (n()) {
b(a, s, "");
c(5);
}
}
};
class t : C {
public:
t(int) : C(d) {}
};
r ag('b', 0), ah(o(), 0), ai(e, 0), aj(f, 0), ak(g, 0), al(h, 0), am(k, 0),
an(i, 0), ao(j, 0);
t ap(0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment