https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106905
Bug ID: 106905 Summary: [13 Regression] ia64: ICE in in vect_peel_nonlinear_iv_init, at tree-vect-loop.cc:8412 on zstd-1.5.2 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- The error apepared in this week's gcc-weekly snapshot. Original failure happens to ICE on zstd-1.5.2 when compiling for ia64-unknown-linux-gnu target. Extracted example: // $ cat zdict.c.c long ZDICT_fillNoise_p, ZDICT_trainFromBuffer_legacy_result; unsigned ZDICT_fillNoise_acc; int ZDICT_totalSampleSize_nbFiles; static void ZDICT_fillNoise(void *buffer, long length) { unsigned prime2 = 9; for (ZDICT_fillNoise_p = 0; ZDICT_fillNoise_p < length; ZDICT_fillNoise_p++) ZDICT_fillNoise_acc *= ((char *)buffer)[ZDICT_fillNoise_p] = prime2; } long ZDICT_trainFromBuffer_legacy() { void *newBuff; long total; for (; ZDICT_totalSampleSize_nbFiles;) total += 0; long sBuffSize = total; newBuff = 0; ZDICT_fillNoise(newBuff + sBuffSize, 32); return ZDICT_trainFromBuffer_legacy_result; } Crashing: $ ia64-unknown-linux-gnu-gcc-13.0.0 -std=c99 -Wall -Wextra -O3 -fPIC -c zdict.c.c during GIMPLE pass: vect zdict.c.c: In function 'ZDICT_trainFromBuffer_legacy': zdict.c.c:10:6: internal compiler error: in vect_peel_nonlinear_iv_init, at tree-vect-loop.cc:8412 10 | long ZDICT_trainFromBuffer_legacy() { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x142e907 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x142f757 internal_error(char const*, ...) ???:0 0x5db0de fancy_abort(char const*, int, char const*) ???:0 0x5c8a88 vect_peel_nonlinear_iv_init(gimple**, tree_node*, tree_node*, tree_node*, vect_induction_op_type) [clone .cold] ???:0 0xd9b1f1 vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*, tree_node**, tree_node**, tree_node**, int, bool, bool, tree_node**) ???:0 0xd90776 vect_transform_loop(_loop_vec_info*, gimple*) ???:0 0xdc8a0b vect_transform_loops(hash_table<simduid_to_vf, false, xcallocator>*&, loop*, gimple*, function*) ???:0 0xdc90a3 try_vectorize_loop(hash_table<simduid_to_vf, false, xcallocator>*&, unsigned int*, loop*, function*) ???:0 0xdc960c (anonymous namespace)::pass_vectorize::execute(function*) ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ ia64-unknown-linux-gnu-gcc-13.0.0 -v Using built-in specs. COLLECT_GCC=/<<NIX>>/ia64-unknown-linux-gnu-stage-final-gcc-13.0.0/bin/ia64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/<<NIX>>/ia64-unknown-linux-gnu-stage-final-gcc-13.0.0/libexec/gcc/ia64-unknown-linux-gnu/13.0.0/lto-wrapper Target: ia64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220911 (experimental) (GCC) x86_64 target does not seem to crash when executed as is.