+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
{
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))
{
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
--- /dev/null
+/* 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);
+}