Fix issue with NULL as_a in duplicate_insn_chain

2014-08-20  David Malcolm  <dmalcolm@redhat.com>

	* cfgrtl.c (duplicate_insn_chain): Convert the checked cast on
	"insn" from an as_a to a safe_as_a, for the case when "insn" is
	NULL.

From-SVN: r214207
This commit is contained in:
David Malcolm 2014-08-20 01:54:35 +00:00 committed by David Malcolm
parent bb0ae1d6f2
commit 7351b44f25
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-08-20 David Malcolm <dmalcolm@redhat.com>
* cfgrtl.c (duplicate_insn_chain): Convert the checked cast on
"insn" from an as_a to a safe_as_a, for the case when "insn" is
NULL.
2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR preprocessor/51303

View file

@ -4166,7 +4166,7 @@ duplicate_insn_chain (rtx from, rtx to)
}
insn = NEXT_INSN (last);
delete_insn (last);
return as_a <rtx_insn *> (insn);
return safe_as_a <rtx_insn *> (insn);
}
/* Create a duplicate of the basic block BB. */