Commit f45be077 by Jakub Jelinek Committed by Jakub Jelinek

re PR ipa/65521 (nondeterministic -fcompare-debug failures)

	PR ipa/65521
	* ipa-icf.c (sem_item::update_hash_by_addr_refs): Hash
	ultimate_alias_target ()->order ints instead of
	ultimate_alias_target () pointers.

	* gcc.dg/pr65521.c: New test.

From-SVN: r221596
parent d5f035ea
2014-03-23 Jakub Jelinek <jakub@redhat.com>
PR ipa/65521
* ipa-icf.c (sem_item::update_hash_by_addr_refs): Hash
ultimate_alias_target ()->order ints instead of
ultimate_alias_target () pointers.
2015-03-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/65518
......
......@@ -575,7 +575,7 @@ sem_item::update_hash_by_addr_refs (hash_map <symtab_node *,
{
ref = node->iterate_reference (i, ref);
if (ref->address_matters_p () || !m_symtab_node_map.get (ref->referred))
hstate.add_ptr (ref->referred->ultimate_alias_target ());
hstate.add_int (ref->referred->ultimate_alias_target ()->order);
}
if (is_a <cgraph_node *> (node))
......@@ -585,7 +585,7 @@ sem_item::update_hash_by_addr_refs (hash_map <symtab_node *,
{
sem_item **result = m_symtab_node_map.get (e->callee);
if (!result)
hstate.add_ptr (e->callee->ultimate_alias_target ());
hstate.add_int (e->callee->ultimate_alias_target ()->order);
}
}
......
2014-03-23 Jakub Jelinek <jakub@redhat.com>
PR ipa/65521
* gcc.dg/pr65521.c: New test.
2015-03-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/65518
......
/* PR ipa/65521 */
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
struct S { int s; };
int f6 (void *, unsigned long);
int f7 (int, int *, unsigned long);
int f8 (void);
int f9 (void (*) (void));
int
f1 (void *p)
{
return f6 (p, 256UL);
}
int
f2 (void *p)
{
return f6 (p, 256UL);
}
int
f3 (struct S *x)
{
return f7 (f8 (), &x->s, 16UL);
}
int
f4 (struct S *x)
{
return f7 (f8 (), &x->s, 16UL);
}
void
f5 (void)
{
f9 (f5);
}
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