Commit ba21aba3 by David Daney Committed by David Daney

cfgcleanup.c (old_insns_match_p): Handle the case of empty blocks.

2009-07-25  David Daney  <ddaney@caviumnetworks.com>

	* cfgcleanup.c (old_insns_match_p): Handle the case of empty
	blocks.

2009-07-25  David Daney  <ddaney@caviumnetworks.com>

	* gcc.dg/builtin-unreachable-4.c: New test.

From-SVN: r150089
parent 504ed63a
2009-07-25 David Daney <ddaney@caviumnetworks.com>
* cfgcleanup.c (old_insns_match_p): Handle the case of empty
blocks.
2009-07-25 Martin Jambor <mjambor@suse.cz>
* c-common.c (c_common_attribute_table): New element for noclone.
......
......@@ -953,7 +953,12 @@ old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2)
if (GET_CODE (i1) != GET_CODE (i2))
return false;
p1 = PATTERN (i1);
/* __builtin_unreachable() may lead to empty blocks (ending with
NOTE_INSN_BASIC_BLOCK). They may be crossjumped. */
if (NOTE_INSN_BASIC_BLOCK_P (i1) && NOTE_INSN_BASIC_BLOCK_P (i2))
return true;
p1 = PATTERN (i1);
p2 = PATTERN (i2);
if (GET_CODE (p1) != GET_CODE (p2))
......
2009-07-25 David Daney <ddaney@caviumnetworks.com>
* gcc.dg/builtin-unreachable-4.c: New test.
2009-07-25 Tobias Burnus <burnus@net-b.de>
PR fortran/33197
......
/* Check that this valid code doesn't ICE. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
void
g (int a, int b, int c, int d)
{
if (d)
{
((void)
(!(a && b && c) ? __builtin_unreachable (), 0 : 0));
}
((void)
(!(a && b && c) ? __builtin_unreachable (), 0 : 0));
}
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