https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104967
Bug ID: 104967 Summary: ICE: Segmentation fault (in find_instance) Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: powerpc-e300c3-linux-gnu gcc 12.0.1 20220313 snapshot (g:7e28750395889d16a9cba49cd5935ced7dc00ce8) ICEs when compiling the following testcase, reduced from gcc/testsuite/gcc.target/powerpc/float128-hw4.c, for 32-bit BE target: long double set_float128_exponent_float128 (long double a, int e) { return __builtin_vec_scalar_insert_exp (a, e); } % powerpc-e300c3-linux-gnu-gcc-12.0.1 -c iudcdop7.c iudcdop7.c: In function 'set_float128_exponent_float128': iudcdop7.c:4:3: internal compiler error: Segmentation fault 4 | return __builtin_vec_scalar_insert_exp (a, e); | ^~~~~~ 0xe3e12f crash_signal /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/toplev.cc:322 0x8f5e88 tree_check2(tree_node*, char const*, int, char const*, tree_code, tree_code) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/tree.h:3467 0x8f5e88 find_instance(bool*, ovlddata**, rs6000_gen_builtins, rs6000_gen_builtins, tree_node**, tree_node**) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/config/rs6000/rs6000-c.cc:1690 0x8f692c altivec_resolve_overloaded_builtin(unsigned int, tree_node*, void*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/config/rs6000/rs6000-c.cc:1951 0x81e3d4 c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap, vl_ptr> const&, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc, vl_embed>*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-typeck.cc:3268 0x83fdd7 c_parser_postfix_expression_after_primary /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:10561 0x836f98 c_parser_postfix_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:10234 0x83b47a c_parser_unary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:8261 0x83cc51 c_parser_cast_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:8103 0x83cee1 c_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:7906 0x83e3ae c_parser_conditional_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:7606 0x83ec00 c_parser_expr_no_commas /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:7521 0x83ee91 c_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:10697 0x83f668 c_parser_expression_conv /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:10736 0x8351cb c_parser_statement_after_labels /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:6173 0x836ada c_parser_compound_statement_nostart /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:5800 0x8573e5 c_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:5609 0x858f78 c_parser_declaration_or_fndef /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:2544 0x861363 c_parser_external_declaration /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:1779 0x861dbb c_parser_translation_unit /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220313/work/gcc-12-20220313/gcc/c/c-parser.cc:1652 I'm not sure if it is related to PR104482.