https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85286

            Bug ID: 85286
           Summary: ICE in exact_div, at poly-int.h:2139
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rsandifo at gcc dot gnu.org
  Target Milestone: ---

Probably similar to PR83753.

We ICE on:

$ aarch64-linux-gnu-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
/dev/null -Ofast --param scev-max-expr-complexity=0
during GIMPLE pass: vect
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c:
In function ‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c:5:1:
internal compiler error: in exact_div, at poly-int.h:2139
 foo (short x)
 ^~~
0xe4a39f poly_int<2u, poly_result<unsigned long, if_nonpoly<unsigned long,
unsigned long, poly_int_traits<unsigned long>::is_poly>::type,
poly_coeff_pair_traits<unsigned long, if_nonpoly<unsigned long, unsigned long,
poly_int_traits<unsigned long>::is_poly>::type>::result_kind>::type>
exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long>
const&, unsigned long)
        .././../gcc/poly-int.h:2139
0xe4a39f poly_int<2u, poly_result<unsigned long, unsigned long,
poly_coeff_pair_traits<unsigned long, unsigned long>::result_kind>::type>
exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long>
const&, poly_int_pod<2u, unsigned long> const&)
        .././../gcc/poly-int.h:2152
0xe4a39f vect_get_num_vectors
        .././../gcc/tree-vectorizer.h:1310
0xe53bd9 vect_get_num_copies
        .././../gcc/tree-vectorizer.h:1321
0xe53bd9 vectorizable_reduction(gimple*, gimple_stmt_iterator*, gimple**,
_slp_tree*, _slp_instance*)
        .././../gcc/tree-vect-loop.c:6547
0xe48bb7 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*,
_slp_instance*)
        .././../gcc/tree-vect-stmts.c:9529
0xe57997 vect_transform_loop(_loop_vec_info*)
        .././../gcc/tree-vect-loop.c:8771
0xe78093 vectorize_loops()
        .././../gcc/tree-vectorizer.c:740

Reply via email to