http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34949
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #32 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-08 13:50:42 UTC --- Author: jakub Date: Mon Apr 8 13:46:00 2013 New Revision: 197580 URL: http://gcc.gnu.org/viewcvs?rev=197580&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/g++.dg/opt/vt3.C trunk/gcc/testsuite/g++.dg/opt/vt4.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-eh.c trunk/gcc/tree-ssa-ccp.c