https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102492
Bug ID: 102492 Summary: [12 Regression] ICE in scan_sharing_clauses, at omp-low.c:1205 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openmp Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Created attachment 51510 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51510&action=edit Testcase g++-12.0.0-alpha20210919 snapshot (g:32731fa5b0abf092029b8e2be64319b978bda514) ICEs when compiling the attached testcase, partially reduced from libstdc++-v3/testsuite/26_numerics/pstl/numeric_ops/reduce.cc, w/ -fopenmp: % g++-12.0.0 -fopenmp -c vksbmhow.cc vksbmhow.cc: In function 'void __simd_transform_reduce(_Size, _Tp, _BinaryOperation) [with _Size = int; _Tp = Number; _BinaryOperation = int]': vksbmhow.cc:25:9: error: no matching function for call to 'Number::Number()' 25 | #pragma omp simd | ^~~ vksbmhow.cc:2:3: note: candidate: 'Number::Number(int)' 2 | Number(int); | ^~~~~~ vksbmhow.cc:2:3: note: candidate expects 1 argument, 0 provided vksbmhow.cc:1:8: note: candidate: 'constexpr Number::Number(const Number&)' 1 | struct Number { | ^~~~~~ vksbmhow.cc:1:8: note: candidate expects 1 argument, 0 provided vksbmhow.cc:1:8: note: candidate: 'constexpr Number::Number(Number&&)' vksbmhow.cc:1:8: note: candidate expects 1 argument, 0 provided during GIMPLE pass: omplower vksbmhow.cc:25:9: internal compiler error: in scan_sharing_clauses, at omp-low.c:1205 25 | #pragma omp simd | ^~~ 0x7c90d0 scan_sharing_clauses /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:1205 0x1014514 scan_omp_for /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:2820 0x1015c00 scan_omp_1_stmt /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:4137 0xe7deea walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:602 0xe7e120 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:51 0xe7dfd5 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:711 0xe7e120 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:51 0xe7dfd5 walk_gimple_stmt(gimple_stmt_iterator*, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:711 0xe7e120 walk_gimple_seq_mod(gimple**, tree_node* (*)(gimple_stmt_iterator*, bool*, walk_stmt_info*), tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/gimple-walk.c:51 0x10213e5 scan_omp /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:4241 0x10213e5 execute_lower_omp /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:14292 0x10213e5 execute /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210919/work/gcc-12-20210919/gcc/omp-low.c:14350