https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103622
Bug ID: 103622 Summary: ICE: Segmentation fault (in altivec_resolve_new_overloaded_builtin) Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: error-recovery Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- Target: powerpc-*-linux-gnu gcc 12.0.0 20211205 snapshot (g:c9419faef0bfaf31e6a6f744baa064892e0d105c) ICEs when compiling the following testcase, extracted from gcc/testsuite/gcc.target/powerpc/float128-hw4.c, for a target older than power9: unsigned int get_float128_exponent (long double a) { return __builtin_vec_scalar_extract_exp (a); } % powerpc-e300c3-linux-gnu-gcc-12.0.0 -c ntldzv7v.c ntldzv7v.c: In function 'get_float128_exponent': ntldzv7v.c:4:3: internal compiler error: Segmentation fault 4 | return __builtin_vec_scalar_extract_exp (a); | ^~~~~~ 0xe90b56 crash_signal /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/toplev.c:322 0x93bbc9 tree_check2(tree_node*, char const*, int, char const*, tree_code, tree_code) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/tree.h:3459 0x93bbc9 altivec_resolve_new_overloaded_builtin /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/config/rs6000/rs6000-c.c:2947 0x860aa4 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.0_p20211205/work/gcc-12-20211205/gcc/c/c-typeck.c:3268 0x881e00 c_parser_postfix_expression_after_primary /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:10555 0x879284 c_parser_postfix_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:10228 0x87d80a c_parser_unary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:8254 0x87ed57 c_parser_cast_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:8096 0x87ef94 c_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:7899 0x880481 c_parser_conditional_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:7599 0x880d91 c_parser_expr_no_commas /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:7514 0x8810cd c_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:10691 0x877e5f c_parser_expression_conv /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:10730 0x877e5f c_parser_statement_after_labels /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:6166 0x878f1a c_parser_compound_statement_nostart /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:5793 0x89707d c_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:5602 0x8988f3 c_parser_declaration_or_fndef /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:2544 0x8a030b c_parser_external_declaration /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:1779 0x8a0b8b c_parser_translation_unit /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:1652 0x8a0b8b c_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211205/work/gcc-12-20211205/gcc/c/c-parser.c:23279