mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/46461 (ICE: invalid argument to gimple call at -O with __builtin_memset())
PR tree-optimization/46461 * tree-ssa-forwprop.c (simplify_builtin_call): Ensure ptr1 is a gimple val. * gcc.c-torture/compile/pr46461.c: New test. From-SVN: r166776
This commit is contained in:
parent
ecbfe87a7b
commit
7a4f257ddd
|
|
@ -1,3 +1,9 @@
|
||||||
|
2010-11-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR tree-optimization/46461
|
||||||
|
* tree-ssa-forwprop.c (simplify_builtin_call): Ensure ptr1 is
|
||||||
|
a gimple val.
|
||||||
|
|
||||||
2010-11-15 Ian Lance Taylor <iant@google.com>
|
2010-11-15 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
* godump.c: New file.
|
* godump.c: New file.
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-11-15 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR tree-optimization/46461
|
||||||
|
* gcc.c-torture/compile/pr46461.c: New test.
|
||||||
|
|
||||||
2010-11-15 Tobias Burnus <burnus@net.b.de>
|
2010-11-15 Tobias Burnus <burnus@net.b.de>
|
||||||
|
|
||||||
PR fortran/46484
|
PR fortran/46484
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
/* PR tree-optimization/46461 */
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (char *c)
|
||||||
|
{
|
||||||
|
c[7] = 0xff;
|
||||||
|
__builtin_memset (c + 8, 0xff, 8);
|
||||||
|
}
|
||||||
|
|
@ -1594,6 +1594,9 @@ simplify_builtin_call (gimple_stmt_iterator *gsi_p, tree callee2)
|
||||||
memcpy call. */
|
memcpy call. */
|
||||||
gimple_stmt_iterator gsi = gsi_for_stmt (stmt1);
|
gimple_stmt_iterator gsi = gsi_for_stmt (stmt1);
|
||||||
|
|
||||||
|
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, built_in_decls [BUILT_IN_MEMCPY]);
|
gimple_call_set_fndecl (stmt2, built_in_decls [BUILT_IN_MEMCPY]);
|
||||||
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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue