Commit 956d3e61 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/79633 (ICE in gimple_call_arg, at gimple.h:3163)

	PR target/79633
	* tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
	is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
	Use gimple_call_builtin_p.

	* gcc.target/i386/mpx/pr79633.c: New test.

From-SVN: r245634
parent d4cbfca4
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR target/79633
* tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
Use gimple_call_builtin_p.
PR target/79570
* sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
on temporarily removed DEBUG_INSNs.
......
2017-02-21 Jakub Jelinek <jakub@redhat.com>
PR target/79633
* gcc.target/i386/mpx/pr79633.c: New test.
PR target/79570
* gcc.dg/pr79570.c: New test.
......
/* PR target/79633 */
/* { dg-do compile } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -w -O2" } */
extern void *memcpy ();
void
foo ()
{
memcpy ();
}
......@@ -964,15 +964,12 @@ chkp_optimize_string_function_calls (void)
gimple *stmt = gsi_stmt (i);
tree fndecl;
if (gimple_code (stmt) != GIMPLE_CALL
|| !gimple_call_with_bounds_p (stmt))
if (!is_gimple_call (stmt)
|| !gimple_call_with_bounds_p (stmt)
|| !gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
continue;
fndecl = gimple_call_fndecl (stmt);
if (!fndecl || DECL_BUILT_IN_CLASS (fndecl) != BUILT_IN_NORMAL)
continue;
if (DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMCPY_CHKP
|| DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMPCPY_CHKP
|| DECL_FUNCTION_CODE (fndecl) == BUILT_IN_MEMMOVE_CHKP
......
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