Consider: void f(int) __attribute__((__noreturn__)); int d(const char *); char * j (); char * foo (int x) { char *path = __null; try { path = j (); if (path != __null) if (d (path) != 0) f (127); f (127); } catch (...) { } return path; } With -O2, I get: Conflict path_1 and path_6 across an abnormal edge from BB5->BB6 test.cc: In function ‘char* foo(int)’: test.cc:6: internal compiler error: SSA corruption Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. The testcase is simplified a little bit from the one posted at: http://gcc.gnu.org/ml/gcc-regression/2005-04/msg00031.html
Confirmed.
Adding build keyword as this is causing the powerpc-darwin build to fail.
Created attachment 8572 [details] side-by-side diff Here is a side-by-side diff between t23.dce2 and t24.vrp.
Created attachment 8573 [details] side-by-side diff with blocks side-by-side diff with blocks between t23.dce2 and t24.vrp.
Patch posted: http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01050.html
*** Bug 20944 has been marked as a duplicate of this bug. ***
Subject: Bug 20920 CVSROOT: /cvs/gcc Module name: gcc Changes by: dnovillo@gcc.gnu.org 2005-04-11 15:05:50 Modified files: gcc : ChangeLog tree-pretty-print.c tree-vrp.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/tree-ssa: pr20920.C Log message: PR tree-optimization/20920 * tree-pretty-print.c (dump_generic_node): Show '(ab)' if an SSA_NAME flows through an abnormal edge. * tree-vrp.c (infer_value_range): Ignore SSA names that flow through abnormal edges. (maybe_add_assert_expr): Likewise. PR tree-optimization/20920 * g++.dg/tree-ssa/pr20920.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8227&r2=2.8228 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pretty-print.c.diff?cvsroot=gcc&r1=2.56&r2=2.57 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vrp.c.diff?cvsroot=gcc&r1=2.2&r2=2.3 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5324&r2=1.5325 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr20920.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed. http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01050.html