Commit 3c031cbe by Martin Liska Committed by Martin Liska

re PR ipa/65282 (wrong code at -Os and above on x86_64-linux-gnu)

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
parent 2f159d9f
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
......
......@@ -1638,7 +1638,7 @@ sem_variable::equals (tree t1, tree t2)
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
......
/* { 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" } } */
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