diff options
author | Martin Jambor <mjambor@suse.cz> | 2019-10-04 18:25:02 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2019-10-04 18:25:02 +0200 |
commit | 432bbcbb1e9d4a2b2bd946a0120c2be52c4ec01d (patch) | |
tree | fe5519960687c1312df8d0c2ed9db817bbbdb154 /gcc | |
parent | ddf25542f2fadde86c04547decb73c08a99ee215 (diff) | |
download | gcc-432bbcbb1e9d4a2b2bd946a0120c2be52c4ec01d.zip gcc-432bbcbb1e9d4a2b2bd946a0120c2be52c4ec01d.tar.gz gcc-432bbcbb1e9d4a2b2bd946a0120c2be52c4ec01d.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-forwprop.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5883b18..a013d86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * hash-table.h (hash_table::empty_slow): Don't assign diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index 221f140..a1e22c9 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -1426,8 +1426,10 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2) if (!is_gimple_val (ptr1)) ptr1 = force_gimple_operand_gsi (gsi_p, ptr1, true, NULL_TREE, true, GSI_SAME_STMT); - gimple_call_set_fndecl (stmt2, - builtin_decl_explicit (BUILT_IN_MEMCPY)); + tree fndecl = 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, 1, new_str_cst); gimple_call_set_arg (stmt2, 2, |