http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59059

            Bug ID: 59059
           Summary: [4.9 Regression] internal compiler error: tree check:
                    expected integer_cst, have nop_expr in
                    tree_int_cst_lt, at tree.c:6931
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Joost.VandeVondele at mat dot ethz.ch

A recent regression, likely introduced between r204496 and r204556

> cat bug.f90
  SUBROUTINE collocate_core_default(grid,lp,cmax,coef_xyz,pol_z,gridbounds)
    INTEGER, PARAMETER :: wp=8
    INTEGER  :: cmax,lp
    REAL(wp) :: coef_xyz(((lp+1)*(lp+2)*(lp+3))/6)
    REAL(wp) :: pol_z(1:2,0:lp,-cmax:0)
    INTEGER  :: gridbounds(2,3)
    REAL(wp) :: grid(gridbounds(1,1):gridbounds(2,1), &
                     gridbounds(1,2):gridbounds(2,2), &
                     gridbounds(1,3):gridbounds(2,3))
    INTEGER  :: coef_xy(2,(lp+1)*(lp+2)/2), s04

    DO kg=kgmin,0
       DO lzp=0,lp
          DO lyp=0,lp-lzp
             DO lxp=0,lp-lzp-lyp
                lxyz=lxyz+1 ; lxy=lxy+1
                coef_xy(1,lxy)=coef_xy(1,lxy)+coef_xyz(lxyz)*pol_z(1,lzp,kg)
                coef_xy(2,lxy)=coef_xy(2,lxy)+coef_xyz(lxyz)*pol_z(2,lzp,kg)
             ENDDO
             grid(i,j2,k2) = grid(i,j2,k2) + s04
          END DO
       END DO
    END DO
  END SUBROUTINE collocate_core_default

> gfortran -O3 bug.f90
bug.f90: In function ‘collocate_core_default’:
bug.f90:1:0: internal compiler error: tree check: expected integer_cst, have
nop_expr in tree_int_cst_lt, at tree.c:6931
   SUBROUTINE collocate_core_default(grid,lp,cmax,coef_xyz,pol_z,gridbounds)
 ^
0xc248f4 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9144
0xc27f02 tree_check
        ../../gcc/gcc/tree.h:2914
0xc27f02 tree_int_cst_lt(tree_node const*, tree_node const*)
        ../../gcc/gcc/tree.c:6931
0xc27f28 tree_int_cst_compare(tree_node const*, tree_node const*)
        ../../gcc/gcc/tree.c:6941
0xf695ac comp_dr_addr_with_seg_len_pair
        ../../gcc/gcc/tree-vect-data-refs.c:2672
0xf695ac comp_dr_addr_with_seg_len_pair
        ../../gcc/gcc/tree-vect-data-refs.c:2645
0xf70ac8 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_embed>::qsort(int
(*)(void const*, void const*))
        ../../gcc/gcc/vec.h:941
0xf70ac8 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_ptr>::qsort(int (*)(void
const*, void const*))
        ../../gcc/gcc/vec.h:1620
0xf70ac8 vect_prune_runtime_alias_test_list(_loop_vec_info*)
        ../../gcc/gcc/tree-vect-data-refs.c:2845
0xbf1b67 vect_analyze_loop_2
        ../../gcc/gcc/tree-vect-loop.c:1716
0xbf1b67 vect_analyze_loop(loop*)
        ../../gcc/gcc/tree-vect-loop.c:1807
0xc05173 vectorize_loops()
        ../../gcc/gcc/tree-vectorizer.c:360
Please submit a full bug report,

Reply via email to