]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/34949 (Dead code in empty destructors.)
authorJakub Jelinek <jakub@gcc.gnu.org>
Mon, 8 Apr 2013 13:46:00 +0000 (15:46 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 8 Apr 2013 13:46:00 +0000 (15:46 +0200)
commitf223bb136269cc62ae94cc5d382e08be53b47acd
treea3858d5e8ddd0ca9b466d3525480cd3308ad2bfb
parent4481581f34be81348f36276e290c80d59fbf49c6
re PR c++/34949 (Dead code in empty destructors.)

PR c++/34949
PR c++/50243
* tree-eh.c (optimize_clobbers): Only remove clobbers if bb doesn't
contain anything but clobbers, at most one __builtin_stack_restore,
optionally debug stmts and final resx, and if it has at least one
incoming EH edge.  Don't check for SSA_NAME on LHS of a clobber.
(sink_clobbers): Don't check for SSA_NAME on LHS of a clobber.
Instead of moving clobbers with MEM_REF LHS with SSA_NAME address
which isn't defaut definition, remove them.
(unsplit_eh, cleanup_empty_eh): Use single_{pred,succ}_{p,edge}
instead of EDGE_COUNT comparisons or EDGE_{PRED,SUCC}.
* tree-ssa-ccp.c (execute_fold_all_builtins): Remove clobbers
with MEM_REF LHS with SSA_NAME address.

* g++.dg/opt/vt3.C: New test.
* g++.dg/opt/vt4.C: New test.

From-SVN: r197580
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/vt3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/opt/vt4.C [new file with mode: 0644]
gcc/tree-eh.c
gcc/tree-ssa-ccp.c