https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107789
Bug ID: 107789 Summary: [13 Regression] slp ICE on hdf5: internal compiler error: Segmentation fault Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Likely this week's gcc-13 regression. Originally observed on hdf5-1.12.2 upstream package. Smaller extracted example: $ cat a.c.c long ga, gb, gc, gd; unsigned long ge, gf; int gh; int bug(void) { gf = gb ? ga : 0; gf -= gh * ge; gc += gd * ge; if (gf) gc += gf; return 0; } Crashes as: gcc -std=c99 -O2 -c a.c.c -o a.o -O2 during GIMPLE pass: slp a.c.c: In function 'bug': a.c.c:4:5: internal compiler error: Segmentation fault 4 | int bug(void) { | ^~~ 0x1ae8c54 diagnostic_impl(rich_location*, diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x1ae98a6 internal_error(char const*, ...) ???:0 0xcb2b3f crash_signal(int) ???:0 0xf194b7 complex_mul_pattern::matches(_complex_operation, hash_map<_slp_tree*, _complex_perm_kinds, simple_hashmap_traits<default_hash_traits<_slp_tree*>, _complex_perm_kinds> >*, hash_map<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> >, bool, simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> > >, bool> >*, _slp_tree**, vec<_slp_tree*, va_heap, vl_ptr>*) [clone .part.0] ???:0 0xf1a423 complex_operations_pattern::recognize(hash_map<_slp_tree*, _complex_perm_kinds, simple_hashmap_traits<default_hash_traits<_slp_tree*>, _complex_perm_kinds> >*, hash_map<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> >, bool, simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> > >, bool> >*, _slp_tree**) ???:0 0xf0736f vect_match_slp_patterns_2(_slp_tree**, vec_info*, hash_map<_slp_tree*, _complex_perm_kinds, simple_hashmap_traits<default_hash_traits<_slp_tree*>, _complex_perm_kinds> >*, hash_map<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> >, bool, simple_hashmap_traits<default_hash_traits<pair_hash<nofree_ptr_hash<_slp_tree>, nofree_ptr_hash<_slp_tree> > >, bool> >*, hash_set<_slp_tree*, false, default_hash_traits<_slp_tree*> >*) ???:0 0xf08597 vect_analyze_slp(vec_info*, unsigned int) ???:0 0xf11283 vect_slp_region(vec<basic_block_def*, va_heap, vl_ptr>, vec<data_reference*, va_heap, vl_ptr>, vec<int, va_heap, vl_ptr>*, unsigned int, loop*) ???:0 0xf1398c vect_slp_bbs(vec<basic_block_def*, va_heap, vl_ptr> const&, loop*) ???:0 0xf13bd4 vect_slp_function(function*) ???:0 0xf1b489 (anonymous namespace)::pass_slp_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. $ gcc -v Using built-in specs. COLLECT_GCC=/<<NIX>>/gcc-13.0.0/bin/gcc COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20221118 (experimental) (GCC)