https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111919

            Bug ID: 111919
           Summary: [14 Regression] ICE: tree check: did not expect class
                    'type', have 'type' (integer_type) in
                    contains_placeholder_p, at tree.cc:4144 on valid code
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 56168
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56168&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc testcase.C
testcase.C: In function 'void Receive()':
testcase.C:11:34: internal compiler error: tree check: did not expect class
'type', have 'type' (integer_type) in contains_placeholder_p, at tree.cc:4144
   11 |   s.i[0 / (int) sizeof (int)] |= 0;
      |                                  ^
0x9596f7 tree_not_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        /repo/gcc-trunk/gcc/tree.cc:9046
0xf0be06 non_type_check(tree_node*, char const*, int, char const*)
        /repo/gcc-trunk/gcc/tree.h:3807
0x1abcb74 contains_placeholder_p(tree_node const*)
        /repo/gcc-trunk/gcc/tree.cc:4147
0x1abccbc contains_placeholder_p(tree_node const*)
        /repo/gcc-trunk/gcc/tree.cc:4113
0x1abffaa save_expr(tree_node*)
        /repo/gcc-trunk/gcc/tree.cc:3972
0x1ac04d1 stabilize_reference(tree_node*)
        /repo/gcc-trunk/gcc/tree.cc:4859
0x115154e cp_build_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
int)
        /repo/gcc-trunk/gcc/cp/typeck.cc:9510
0xecc896 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
        /repo/gcc-trunk/gcc/cp/call.cc:7312
0x11526b5 build_x_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
tree_node*, int)
        /repo/gcc-trunk/gcc/cp/typeck.cc:9721
0x1041ac4 cp_parser_assignment_expression
        /repo/gcc-trunk/gcc/cp/parser.cc:10605
0x1041c63 cp_parser_expression
        /repo/gcc-trunk/gcc/cp/parser.cc:10734
0x1046647 cp_parser_expression_statement
        /repo/gcc-trunk/gcc/cp/parser.cc:12933
0x1051cbd cp_parser_statement
        /repo/gcc-trunk/gcc/cp/parser.cc:12713
0x1052e47 cp_parser_statement_seq_opt
        /repo/gcc-trunk/gcc/cp/parser.cc:13182
0x1053077 cp_parser_compound_statement
        /repo/gcc-trunk/gcc/cp/parser.cc:13036
0x1074224 cp_parser_function_body
        /repo/gcc-trunk/gcc/cp/parser.cc:25554
0x1074224 cp_parser_ctor_initializer_opt_and_function_body
        /repo/gcc-trunk/gcc/cp/parser.cc:25605
0x107a25e cp_parser_function_definition_after_declarator
        /repo/gcc-trunk/gcc/cp/parser.cc:32267
0x107b6f7 cp_parser_function_definition_from_specifiers_and_declarator
        /repo/gcc-trunk/gcc/cp/parser.cc:32184
0x107b6f7 cp_parser_init_declarator
        /repo/gcc-trunk/gcc/cp/parser.cc:23015
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-4820-20231022022105-g11f50716eee-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-4820-20231022022105-g11f50716eee-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231022 (experimental) (GCC)

Reply via email to