Fix PR ipa/65282.
* gcc.dg/ipa/PR65282.c: New test.
PR ipa/65282
* ipa-icf.c (sem_variable::equals): Fix wrong condition.
From-SVN: r221146
+2015-03-03 Martin Liska <mliska@suse.cz>
+
+ PR ipa/65282
+ * ipa-icf.c (sem_variable::equals): Fix wrong condition.
+
2015-03-23 Jeff Law <law@redhat.com>
PR tree-optimization/65241
tree y1 = TREE_OPERAND (t1, 1);
tree y2 = TREE_OPERAND (t2, 1);
- if (!sem_variable::equals (x1, x2) && sem_variable::equals (y1, y2))
+ if (!sem_variable::equals (x1, x2) || !sem_variable::equals (y1, y2))
return false;
if (!sem_variable::equals (array_ref_low_bound (t1),
array_ref_low_bound (t2)))
+2015-03-03 Martin Liska <mliska@suse.cz>
+
+ * gcc.dg/ipa/PR65282.c: New test.
+
2015-03-13 Jeff Law <law@redhat.com>
PR tree-optimization/65241
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Os -fdump-ipa-icf" } */
+
+int a[2];
+static int *b = &a[0], *c = &a[1];
+
+int
+main ()
+{
+ *c = 1;
+ *b = 0;
+
+ if (a[1] != 1)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
+/* { dg-final { cleanup-ipa-dump "icf" } } */