http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54967
Bug #: 54967 Summary: [4.8 Regression] ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:55 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: joost.vandevond...@mat.ethz.ch This started failing very recently on trunk : > gfortran -c -O2 -funroll-loops bug.f90 bug.f90: In function ‘calc_s_derivs’: bug.f90:1:0: internal compiler error: in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:557 SUBROUTINE calc_S_derivs() ^ 0xa0cf93 check_loop_closed_ssa_use ../../gcc/gcc/tree-ssa-loop-manip.c:557 0xa0d591 check_loop_closed_ssa_stmt ../../gcc/gcc/tree-ssa-loop-manip.c:572 0xa0d591 verify_loop_closed_ssa(bool) ../../gcc/gcc/tree-ssa-loop-manip.c:606 0xa0d880 gimple_duplicate_loop_to_header_edge(loop*, edge_def*, unsigned int, simple_bitmap_def*, edge_def*, vec_t<edge_def*>**, int) ../../gcc/gcc/tree-ssa-loop-manip.c:762 0xdbd99a try_unroll_loop_completely ../../gcc/gcc/tree-ssa-loop-ivcanon.c:519 0xdbd99a canonicalize_loop_induction_variables ../../gcc/gcc/tree-ssa-loop-ivcanon.c:666 0xdbea10 tree_unroll_loops_completely(bool, bool) ../../gcc/gcc/tree-ssa-loop-ivcanon.c:815 > cat bug.f90 SUBROUTINE calc_S_derivs() INTEGER, DIMENSION(6, 2) :: c_map_mat INTEGER, DIMENSION(:), POINTER:: C_mat DO j=1,3 DO m=j,3 n=n+1 c_map_mat(n,1)=j IF(m==j)CYCLE c_map_mat(n,2)=m END DO END DO DO m=1,6 DO j=1,2 IF(c_map_mat(m,j)==0)CYCLE CALL foo(C_mat(c_map_mat(m,j))) END DO END DO END SUBROUTINE calc_S_derivs