Commit 366ee94b by Jakub Jelinek Committed by Jakub Jelinek

re PR ipa/65765 (Compiling Firefox with GCC 5 leads to broken javascript engine on x86-64)

	PR ipa/65765
	* ipa-icf-gimple.c (func_checker::compare_bb): For GIMPLE_NOP
	and GIMPLE_PREDICT use break instead of return true. For
	GIMPLE_EH_DISPATCH, compare dispatch region.

	* g++.dg/ipa/pr65765.C: New test.

From-SVN: r222123
parent f8a7e154
2015-04-15 Jakub Jelinek <jakub@redhat.com>
PR ipa/65765
* ipa-icf-gimple.c (func_checker::compare_bb): For GIMPLE_NOP
and GIMPLE_PREDICT use break instead of return true. For
GIMPLE_EH_DISPATCH, compare dispatch region.
2015-04-14 Matthew Wahab <matthew.wahab@arm.com>
* doc/extend.texi (__sync Builtins): Simplify some text. Update
......
......@@ -706,7 +706,11 @@ func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
return return_different_stmts (s1, s2, "GIMPLE_SWITCH");
break;
case GIMPLE_DEBUG:
break;
case GIMPLE_EH_DISPATCH:
if (gimple_eh_dispatch_region (as_a <geh_dispatch *> (s1))
!= gimple_eh_dispatch_region (as_a <geh_dispatch *> (s2)))
return return_different_stmts (s1, s2, "GIMPLE_EH_DISPATCH");
break;
case GIMPLE_RESX:
if (!compare_gimple_resx (as_a <gresx *> (s1),
......@@ -734,7 +738,7 @@ func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
break;
case GIMPLE_PREDICT:
case GIMPLE_NOP:
return true;
break;
default:
return return_false_with_msg ("Unknown GIMPLE code reached");
}
......
2015-04-15 Jakub Jelinek <jakub@redhat.com>
PR ipa/65765
* g++.dg/ipa/pr65765.C: New test.
2015-04-15 Nick Clifton <nickc@redhat.com>
* gcc.target/rx/builtins.c: Disable RMPA test if string
......
// PR ipa/65765
// { dg-do run }
// { dg-options "-O2" }
int a, b, c, d, e;
unsigned char h[] = { 1, 1 };
__attribute__ ((cold)) int ModRM_Mode () { return a; }
int
ModRM_RM (int p1)
{
return p1;
}
__attribute__ ((cold)) static bool ModRM_hasSIB (unsigned char p1)
{
return ModRM_Mode () != 1 && ModRM_RM (p1);
}
__attribute__ ((cold)) static bool ModRM_hasRIP (unsigned char p1)
{
return ModRM_Mode () && ModRM_RM (p1);
}
unsigned char *
DisassembleHeapAccess (unsigned char *p1)
{
b = *p1++;
if (ModRM_hasSIB (b))
c = *p1++;
int f = c, g = 0;
d = ModRM_hasRIP (g);
e = f == 0;
if (e)
p1 += sizeof 0;
return p1;
}
int
main ()
{
if (DisassembleHeapAccess (h) != h + 2)
__builtin_abort ();
}
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