From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5BD013857BB8; Tue, 8 Nov 2022 17:25:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5BD013857BB8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667928340; bh=xwvoHmNSV4fnWQSdE+Ym90n2+H1kPWiAoUrKBZLTL+g=; h=From:To:Subject:Date:From; b=p2YYEUD8PVm5FZayuW7he+936xGW5OMwTNzq8R/LHm2PH/je4WH37WXwTE5P8Lome QVyYFpBzkmq0MOToILIlh45R4/UNR2541X4BOW5aZ1o0v6grkfIRSa1rsUNl98eHZn cS6MZrjEsH+yeTbP7fURH2FYlOUO/8xVBq1hDIPw= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107574] New: [10/11/12/13 Regression] ICE: tree check: expected record_type or union_type or qual_union_type, have integer_type in cp_fold_convert, at cp/cvt.cc:613 Date: Tue, 08 Nov 2022 17:25:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107574 Bug ID: 107574 Summary: [10/11/12/13 Regression] ICE: tree check: expected record_type or union_type or qual_union_type, have integer_type in cp_fold_convert, at cp/cvt.cc:613 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Affects versions down to r9 : $ cat z1.cc struct A { int i; }; struct B:A { int j; }; struct C:B { int k; static_assert((int(B::*))&C::k, ""); }; $ g++-13-20221106 -c z1.cc z1.cc:3:50: internal compiler error: tree check: expected record_type or union_type or qual_union_type, have integer_type in cp_fold_convert, at cp/cvt.cc:613 3 | struct C:B { int k; static_assert((int(B::*))&C::k, ""); }; | ^ 0x70312c tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.cc:8846 0x8af521 tree_check3(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code) ../../gcc/tree.h:3572 0x8af521 cp_fold_convert(tree_node*, tree_node*) ../../gcc/cp/cvt.cc:612 0x8666a4 cxx_eval_constant_expression ../../gcc/cp/constexpr.cc:7602 0x8708fa cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.cc:8142 0x8757ea maybe_constant_value(tree_node*, tree_node*, bool) ../../gcc/cp/constexpr.cc:8412 0x8aa095 cp_fully_fold(tree_node*) ../../gcc/cp/cp-gimplify.cc:2370 0xb46c51 cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) ../../gcc/cp/typeck.cc:6565 0xb4bb63 convert_ptrmem(tree_node*, tree_node*, bool, bool, int) ../../gcc/cp/typeck.cc:8171 0xb522f2 cp_build_c_cast(unsigned int, tree_node*, tree_node*, int) ../../gcc/cp/typeck.cc:9189 0xb528b1 build_c_cast(unsigned int, tree_node*, cp_expr) ../../gcc/cp/typeck.cc:9095 0x9f0682 cp_parser_cast_expression ../../gcc/cp/parser.cc:9978 0x9f0ccf cp_parser_binary_expression ../../gcc/cp/parser.cc:10091 0x9f1a74 cp_parser_assignment_expression ../../gcc/cp/parser.cc:10431 0x9f48a5 cp_parser_constant_expression ../../gcc/cp/parser.cc:10726 0x9f504e cp_parser_static_assert ../../gcc/cp/parser.cc:16280 0xa39204 cp_parser_member_declaration ../../gcc/cp/parser.cc:27068 0xa013b2 cp_parser_member_specification_opt ../../gcc/cp/parser.cc:26936 0xa013b2 cp_parser_class_specifier ../../gcc/cp/parser.cc:26011 0xa04240 cp_parser_type_specifier ../../gcc/cp/parser.cc:19387=