https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Target| |x86_64-pc-linux-gnu --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- And nearby testcase ... $ cat z2.d class c { static f () { return 0; } } void g () { if ([0] & c.f()) {} } $ gdc-10-20190526 -c z2.d z2.d: In function 'g': z2.d:10:7: internal compiler error: tree check: expected none of record_type or union_type or qual_union_type or array_type, have record_type in fold_binary_loc, at fold-const.c:9782 10 | if ([0] & c.f()) {} | ^ 0x608666 tree_not_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9939 0x9a4f4e tree_not_check4(tree_node*, char const*, int, char const*, tree_code, tree_code, tree_code, tree_code) ../../gcc/tree.h:3262 0x982c4e fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:9782 0x98bbaa fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/fold-const.c:12327 0x79c7f7 ExprVisitor::binary_op(tree_code, tree_node*, tree_node*, tree_node*) ../../gcc/d/expr.cc:165 0x79c7f7 ExprVisitor::visit(BinExp*) ../../gcc/d/expr.cc:674 0x79bc7f build_expr(Expression*, bool) ../../gcc/d/expr.cc:3076 0x79bd59 build_expr_dtor(Expression*) ../../gcc/d/expr.cc:3099 0x7acacf IRVisitor::visit(IfStatement*) ../../gcc/d/toir.cc:554 0x7abe92 IRVisitor::build_stmt(Statement*) ../../gcc/d/toir.cc:258 0x7abe92 IRVisitor::visit(CompoundStatement*) ../../gcc/d/toir.cc:1042 0x7ab821 IRVisitor::build_stmt(Statement*) ../../gcc/d/toir.cc:258 0x7ab821 build_function_body(FuncDeclaration*) ../../gcc/d/toir.cc:1447 0x79a844 DeclVisitor::visit(FuncDeclaration*) ../../gcc/d/decl.cc:1006 0x794a16 build_decl_tree(Dsymbol*) ../../gcc/d/decl.cc:1047 0x7a9640 build_module_tree(Module*) ../../gcc/d/modules.cc:726 0x799a3b DeclVisitor::visit(Module*) ../../gcc/d/decl.cc:147 0x794a16 build_decl_tree(Dsymbol*) ../../gcc/d/decl.cc:1047 0x792c57 d_parse_file() ../../gcc/d/d-lang.cc:1310