https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107766
Bug ID: 107766 Summary: [13 Regression] ICE Segmentation fault since r13-4137-gc5df8392c5848c04 Product: gcc Version: 13.0 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: rguenth at gcc dot gnu.org Target Milestone: --- Host: x86_64-linux-gnu The following is reduced from blender package: $ cat bt.ii typedef double btScalar; struct btVector3 { operator btScalar *() const; }; double m_vec[2]; struct btShapeMatrix { double &operator[](int i) { return m_vec[i]; } }; btScalar shape_function___1pxt1pz, shape_function__fac; struct btMiniSDF { void shape_function_(btVector3 const &) const; }; void btMiniSDF::shape_function_(btVector3 const &xi) const { btShapeMatrix res; btScalar _1m3y = 1.0 - 3.0 * xi[1], _1p3y = 1.0 + 3.0 * xi[1], fact1m3y = shape_function__fac * _1m3y, fact1p3y = shape_function__fac * _1p3y; res[22] = fact1m3y * shape_function___1pxt1pz; res[23] = fact1p3y * shape_function___1pxt1pz; } $ g++ bt.ii -c -O2 -ffp-contract=off during GIMPLE pass: slp bt.ii: In member function ‘void btMiniSDF::shape_function_(const btVector3&) const’: bt.ii:13:6: internal compiler error: Segmentation fault 13 | void btMiniSDF::shape_function_(btVector3 const &xi) const { | ^~~~~~~~~ 0x11d53ef crash_signal /home/marxin/Programming/gcc/gcc/toplev.cc:314 0x1493370 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>*) /home/marxin/Programming/gcc/gcc/tree-vect-slp-patterns.cc:1042 0x1494443 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>*) /home/marxin/Programming/gcc/gcc/tree-vect-slp-patterns.cc:1023 0x1494443 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**) /home/marxin/Programming/gcc/gcc/tree-vect-slp-patterns.cc:1424 0x147ee67 vect_match_slp_patterns_2 /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3010 0x147eebe vect_match_slp_patterns_2 /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3003 0x147eebe vect_match_slp_patterns_2 /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3003 0x147eebe vect_match_slp_patterns_2 /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3003 0x14801d3 vect_match_slp_patterns /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3042 0x14801d3 vect_analyze_slp(vec_info*, unsigned int) /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:3533 0x148a6c3 vect_slp_analyze_bb_1 /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:7317 0x148a6c3 vect_slp_region /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:7419 0x148c39c vect_slp_bbs /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:7610 0x148c623 vect_slp_function(function*) /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:7698 0x1495371 execute /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1532 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.