public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104482] New: ICE: Segmentation fault (in rs6000_builtin_type_compatible), or ICE: tree check: expected class 'type', have 'reference' (attr_addr_expr) in cp_type_quals, at cp/typeck.cc:10955 Date: Thu, 10 Feb 2022 08:34:12 +0000 [thread overview] Message-ID: <bug-104482-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104482 Bug ID: 104482 Summary: ICE: Segmentation fault (in rs6000_builtin_type_compatible), or ICE: tree check: expected class 'type', have 'reference' (attr_addr_expr) in cp_type_quals, at cp/typeck.cc:10955 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 1. gcc 12.0.1 20220206 snapshot (g:8eb329e963593342855b6072e5692659107337b7) ICEs when compiling the following testcase, reduced from test/CodeGen/builtins-ppc-error.c from the 13.0.0 test suite, for a 32-bit BE powerpc target: __attribute__ ((altivec (vector__))) int vsi; double testXXPERMDI (void) { return __builtin_vsx_xxpermdi (vsi, vsi, 2, 4); } % powerpc-e300c3-linux-gnu-gcc-12.0.1 -c yyy2r9at.c yyy2r9at.c: In function 'testXXPERMDI': yyy2r9at.c:6:3: internal compiler error: Segmentation fault 6 | return __builtin_vsx_xxpermdi (vsi, vsi, 2, 4); | ^~~~~~ 0xe96c16 crash_signal /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/toplev.cc:322 0x934de1 rs6000_builtin_type_compatible /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/config/rs6000/rs6000-c.cc:822 0x937ed0 altivec_resolve_overloaded_builtin(unsigned int, tree_node*, void*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/config/rs6000/rs6000-c.cc:1969 0x85c7e4 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_p20220206/work/gcc-12-20220206/gcc/c/c-typeck.cc:3268 0x87dd90 c_parser_postfix_expression_after_primary /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:10562 0x875214 c_parser_postfix_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:10235 0x87979a c_parser_unary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:8261 0x87ace7 c_parser_cast_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:8103 0x87af24 c_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:7906 0x87c411 c_parser_conditional_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:7606 0x87cd21 c_parser_expr_no_commas /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:7521 0x87d05d c_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:10698 0x873def c_parser_expression_conv /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:10737 0x873def c_parser_statement_after_labels /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:6173 0x874eaa c_parser_compound_statement_nostart /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:5800 0x89335d c_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:5609 0x894bd3 c_parser_declaration_or_fndef /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:2544 0x89c5eb c_parser_external_declaration /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:1779 0x89ce6b c_parser_translation_unit /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:1652 0x89ce6b c_parse_file() /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/c/c-parser.cc:23331 2. g++ yields the following instead: % powerpc-e300c3-linux-gnu-gcc-12.0.1 -xc++ -c yyy2r9at.c yyy2r9at.c: In function 'double testXXPERMDI()': yyy2r9at.c:6:33: internal compiler error: tree check: expected class 'type', have 'reference' (attr_addr_expr) in cp_type_quals, at cp/typeck.cc:10955 6 | return __builtin_vsx_xxpermdi (vsi, vsi, 2, 4); | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ 0x8260fb tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/tree.cc:8736 0x6c4438 tree_class_check(tree_node const*, tree_code_class, char const*, int, char const*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/tree.h:3824 0x6c4438 cp_type_quals(tree_node const*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/typeck.cc:10955 0xb8925b cp_build_qualified_type_real(tree_node*, int, int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/tree.cc:1355 0xb95a0e same_type_ignoring_top_level_qualifiers_p(tree_node*, tree_node*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/typeck.cc:1592 0xb95a0e same_type_ignoring_top_level_qualifiers_p(tree_node*, tree_node*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/typeck.cc:1585 0x990f98 cxx_types_compatible_p(tree_node*, tree_node*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/cp-objcp-common.cc:126 0xc506f5 rs6000_builtin_type_compatible /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/config/rs6000/rs6000-c.cc:837 0xc53760 altivec_resolve_overloaded_builtin(unsigned int, tree_node*, void*) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/config/rs6000/rs6000-c.cc:1969 0xb56c5a finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/semantics.cc:2818 0xaae166 cp_parser_postfix_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:7878 0xa94d32 cp_parser_binary_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:10041 0xa9575a cp_parser_assignment_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:10345 0xa97412 cp_parser_expression /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:10515 0xaa8d9c cp_parser_jump_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:14301 0xaa8d9c cp_parser_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:12318 0xaa9b1e cp_parser_statement_seq_opt /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:12856 0xaa9c10 cp_parser_compound_statement /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:12808 0xacac6f cp_parser_function_body /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:25062 0xacac6f cp_parser_ctor_initializer_opt_and_function_body /var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.1_p20220206/work/gcc-12-20220206/gcc/cp/parser.cc:25113
next reply other threads:[~2022-02-10 8:34 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-10 8:34 asolokha at gmx dot com [this message] 2022-03-08 9:01 ` [Bug target/104482] " linkw at gcc dot gnu.org 2022-03-15 11:39 ` linkw at gcc dot gnu.org 2022-04-14 3:22 ` linkw at gcc dot gnu.org 2022-05-24 6:32 ` linkw at gcc dot gnu.org 2022-09-13 10:40 ` cvs-commit at gcc dot gnu.org 2022-09-21 5:07 ` cvs-commit at gcc dot gnu.org 2022-09-21 5:10 ` linkw at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-104482-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).