https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102767
Bug ID: 102767
Summary: [12 Regression] ICE in
rs6000_builtin_vectorization_cost, at
config/rs6000/rs6000.c:5216
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-linux-gnu
Target: ppc64le-linux-gnu
The following ICEs:
$ cat ~/Programming/testcases/iso.f90
INTERFACE
FUNCTION elemental_mult(a, b, C)
type(*), DIMENSION(..) :: a, b, c
END
END INTERFACE
allocatable z
integer, dimension(2,2) :: a, b
call test_CFI_address
contains
subroutine test_CFI_address
if (elemental_mult (z, x, y) .ne. 0) stop
a = reshape ([4,3,2,1], [2,2])
b = reshape ([2,3,4,5], [2,2])
if (elemental_mult (i, a, b) .ne. 0) stop
end
end
$ ppc64le-linux-gnu-gcc ~/Programming/testcases/iso.f90 -c
-mno-efficient-unaligned-vsx -O3
during GIMPLE pass: slp
/home/marxin/Programming/testcases/iso.f90:8:23:
8 | call test_CFI_address
| ^
internal compiler error: in rs6000_builtin_vectorization_cost, at
config/rs6000/rs6000.c:5216
0x612d85 rs6000_builtin_vectorization_cost
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/rs6000.c:5216
0xe04a1b builtin_vectorization_cost
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.h:1520
0xe04a1b record_stmt_cost(vec<stmt_info_for_cost, va_heap, vl_ptr>*, int,
vect_cost_for_stmt, _stmt_vec_info*, tree_node*, int, vect_cost_model_location)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:109
0xe04f93 record_stmt_cost
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.h:1928
0xe04f93 vect_get_store_cost(vec_info*, _stmt_vec_info*, int, unsigned int*,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:1050
0xe05135 vect_model_store_cost
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:972
0xe1e21b vectorizable_store
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:7424
0xe2405f vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-stmts.c:10970
0xe5c463 vect_slp_analyze_node_operations_1
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4464
0xe5c463 vect_slp_analyze_node_operations
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4623
0xe5e6f3 vect_slp_analyze_operations(vec_info*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:4862
0xe62656 vect_slp_analyze_bb_1
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:5802
0xe62656 vect_slp_region
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:5849
0xe64114 vect_slp_bbs
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:6041
0xe64375 vect_slp_function(function*)
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vect-slp.c:6129
0xe6a07a execute
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/tree-vectorizer.c:1456
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.