https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92555
Bug ID: 92555 Summary: [10 Regression] ICE in exact_div, at poly-int.h:2162 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-checking, ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: x86_64-pc-linux-gnu-gcc gcc-10.0.0-alpha20191110 snapshot (r278028) ICEs when compiling the following testcase w/ -O3 -fwrapv: signed char rq; signed char pu (int tr, int al) { signed char x8; while (tr != 0) { for (x8 = 0; x8 >= 0; x8 += 2) ; rq ^= al ^ 1; ++x8; ++tr; } return x8; } % x86_64-pc-linux-gnu-gcc-10.0.0-alpha20191110 -O3 -fwrapv -c f6nbni7a.c during GIMPLE pass: vect f6nbni7a.c: In function 'pu': f6nbni7a.c:4:1: internal compiler error: in exact_div, at poly-int.h:2162 4 | pu (int tr, int al) | ^~ 0x6bbc28 poly_int<1u, 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<1u, unsigned long, unsigned long>(poly_int_pod<1u, unsigned long> const&, unsigned long) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/poly-int.h:2162 0x6bbc28 poly_int<1u, poly_result<unsigned long, unsigned long, poly_coeff_pair_traits<unsigned long, unsigned long>::result_kind>::type> exact_div<1u, unsigned long, unsigned long>(poly_int_pod<1u, unsigned long> const&, poly_int_pod<1u, unsigned long> const&) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/poly-int.h:2175 0x6bbc28 vect_get_num_vectors /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vectorizer.h:1478 0x6bbc28 vect_get_num_copies /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vectorizer.h:1489 0x6bbc28 vectorizable_induction(_stmt_vec_info*, gimple_stmt_iterator*, _stmt_vec_info**, _slp_tree*, vec<stmt_info_for_cost, va_heap, vl_ptr>*) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vect-loop.c:7059 0xe9965c vect_analyze_loop_operations /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vect-loop.c:1560 0xe9a94f vect_analyze_loop_2 /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vect-loop.c:2106 0xe9a94f vect_analyze_loop(loop*, vec_info_shared*) /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vect-loop.c:2417 0xeb72c2 try_vectorize_loop_1 /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vectorizer.c:892 0xeb7c6d vectorize_loops() /var/tmp/portage/sys-devel/gcc-10.0.0_alpha20191110/work/gcc-10-20191110/gcc/tree-vectorizer.c:1125