Created attachment 23025 [details] "reduced" test case $ g++ -c -std=c++0x -O2 -fipa-cp-clone test.cpp test.cpp: In function 'vector<green> function()': test.cpp:200:15: error: definition in block 29 does not dominate use in block 28 test.cpp:200:15: error: no immediate_use list for SSA_NAME: D.2314_94 in statement: # .MEM_135 = VDEF <.MEM_109> zfree (D.2314_94); test.cpp:200:15: internal compiler error: verify_ssa failed ...
Created attachment 23026 [details] this is the real test case; ignore the other one please
It is caused by revision 162911: http://gcc.gnu.org/ml/gcc-cvs/2010-08/msg00122.html
From what I have seen, it's pass_cleanup_eh removing an SSA (names$_storage_94) name that is still being referenced in the IL (as a parameter to zfree).
Created attachment 23029 [details] more reduced testcase $ gcc -O -fipa-cp -fipa-cp-clone testcase.C testcase.C: In function 'void foo()': testcase.C:30:1: error: definition in block 15 does not dominate use in block 14 testcase.C:30:1: error: no immediate_use list for SSA_NAME: D.2189_30 in statement: names$_storage_26 = D.2189_30 + D.2160_19; testcase.C:30:1: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. (r168850, x86_64-linux)
Created attachment 23042 [details] gcc46-pr47355.patch Untested fix. Seems ehcleanup assumes nop is used just in the following phi and not somewhere else, because it doesn't attempt to rename it. I'll see with this patch how much it triggers during bootstraps/regtests. We can't just replace the other uses in this case, because it is changed in the loop.
Author: jakub Date: Fri Jan 21 15:15:40 2011 New Revision: 169094 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169094 Log: PR tree-optimization/47355 * tree-eh.c (cleanup_empty_eh_merge_phis): Give up if NOP has non-debug uses beyond PHIs in new_bb. * g++.dg/opt/pr47355.C: New test. Added: trunk/gcc/testsuite/g++.dg/opt/pr47355.C Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-eh.c
Fixed.