http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46036
Summary: [4.6 Regression] verify_ssa failed: definition in block 3 follows the use Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rgue...@gcc.gnu.org function no_of_edges(self) result(res) integer(kind=kind(1)) :: edge_bit_string integer(kind=kind(1)) :: res integer(kind=kind(1)) :: e do e = 0, 11 if (.not. btest(edge_bit_string,e)) cycle res = res + 1 end do end function > ./f951 -quiet -O -ftree-vectorize -flto t.f90 t.f90: In function 'no_of_edges_': t.f90:1:0: error: definition in block 3 follows the use for SSA_NAME: D.1536_19 in statement: res_3 = [cond_expr] D.1536_19 ? res_12 : res_2; t.f90:1:0: 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. for some reason needs -flto to trigger. if-conversion produces: <bb 3>: # e_1 = PHI <0(2), e_14(4)> # res_2 = PHI <res_6(D)(2), res_3(4)> # ivtmp.2_17 = PHI <12(2), ivtmp.2_18(4)> D.1524_8 = edge_bit_string_7(D) >> e_1; D.1525_9 = D.1524_8 & 1; D.1526_10 = (logical(kind=4)) D.1525_9; res_12 = res_2 + 1; res_3 = [cond_expr] D.1536_19 ? res_12 : res_2; e_14 = e_1 + 1; ivtmp.2_18 = ivtmp.2_17 - 1; D.1536_19 = (<unnamed type>) D.1526_10; D.1537_20 = !D.1536_19; D.1538_21 = D.1536_19 || D.1537_20; if (ivtmp.2_18 == 0) goto <bb 5>; else goto <bb 4>;