mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-24 08:50:26 +08:00
re PR tree-optimization/46137 (g++.dg/torture/pr45877.C FAILs with -fno-tree-dce)
2010-10-22 Richard Guenther <rguenther@suse.de> PR middle-end/46137 * gimple-fold.c (gimplify_and_update_call_from_tree): Properly remove the virtual operands if they are not needed. * c-c++-common/torture/pr46137.c: New testcase. From-SVN: r165852
This commit is contained in:
parent
d8c801fdbe
commit
07db7d35a9
@ -1,3 +1,9 @@
|
||||
2010-10-22 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/46137
|
||||
* gimple-fold.c (gimplify_and_update_call_from_tree): Properly
|
||||
remove the virtual operands if they are not needed.
|
||||
|
||||
2010-10-22 Changpeng Fang <changpeng.fang@amd.com>
|
||||
|
||||
* gcc/config/i386/i386.c (processor_costs bdver1_cost): Update
|
||||
|
@ -1044,6 +1044,8 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
|
||||
if (TREE_CODE (gimple_vdef (stmt)) == SSA_NAME)
|
||||
SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = new_stmt;
|
||||
}
|
||||
else if (reaching_vuse == gimple_vuse (stmt))
|
||||
unlink_stmt_vdef (stmt);
|
||||
}
|
||||
|
||||
gimple_set_location (new_stmt, gimple_location (stmt));
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-10-22 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/46137
|
||||
* c-c++-common/torture/pr46137.c: New testcase.
|
||||
|
||||
2010-10-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46129
|
||||
|
18
gcc/testsuite/c-c++-common/torture/pr46137.c
Normal file
18
gcc/testsuite/c-c++-common/torture/pr46137.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* { dg-do compile } */
|
||||
|
||||
struct X { };
|
||||
|
||||
static inline void *
|
||||
bar (void *dst, void *src)
|
||||
{
|
||||
return __builtin___memcpy_chk (dst, src, sizeof (struct X),
|
||||
__builtin_object_size (dst, 0));
|
||||
}
|
||||
|
||||
struct X
|
||||
foo (struct X *x)
|
||||
{
|
||||
struct X any;
|
||||
bar (&any, x);
|
||||
return any;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user