Commit 432bbcbb by Martin Jambor Committed by Martin Jambor

Add missing gimple_call_set_fntype

2019-10-04  Martin Jambor  <mjambor@suse.cz>

	* tree-ssa-forwprop.c (simplify_builtin_call): Set gimple call
	fntype when switching to calling memcpy instead of memset.

From-SVN: r276593
parent ddf25542
2019-10-04 Martin Jambor <mjambor@suse.cz>
* tree-ssa-forwprop.c (simplify_builtin_call): Set gimple call
fntype when switching to calling memcpy instead of memset.
2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de> 2019-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
* hash-table.h (hash_table::empty_slow): Don't assign * hash-table.h (hash_table::empty_slow): Don't assign
......
...@@ -1426,8 +1426,10 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) ...@@ -1426,8 +1426,10 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
if (!is_gimple_val (ptr1)) if (!is_gimple_val (ptr1))
ptr1 = force_gimple_operand_gsi (gsi_p, ptr1, true, NULL_TREE, ptr1 = force_gimple_operand_gsi (gsi_p, ptr1, true, NULL_TREE,
true, GSI_SAME_STMT); true, GSI_SAME_STMT);
gimple_call_set_fndecl (stmt2, tree fndecl = builtin_decl_explicit (BUILT_IN_MEMCPY);
builtin_decl_explicit (BUILT_IN_MEMCPY)); gimple_call_set_fndecl (stmt2, fndecl);
gimple_call_set_fntype (as_a <gcall *> (stmt2),
TREE_TYPE (fndecl));
gimple_call_set_arg (stmt2, 0, ptr1); gimple_call_set_arg (stmt2, 0, ptr1);
gimple_call_set_arg (stmt2, 1, new_str_cst); gimple_call_set_arg (stmt2, 1, new_str_cst);
gimple_call_set_arg (stmt2, 2, gimple_call_set_arg (stmt2, 2,
......
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