https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119991
Bug ID: 119991 Summary: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:621 Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: xieym3 at zohomail dot com Target Milestone: --- $ cat file.c float * fitness_table = NULL; unsigned char * population1 = NULL; float fitness1(unsigned char * dna){ int i; float fitness = 0; for (i = 0; i < 400; ++i){ fitness += fitness1_single(dna + i * 2, fitness_table[i]); } return fitness; } float fitness_table [400] = { }; $ gcc-trunk -v Using built-in specs. COLLECT_GCC=/data/xieym/compiler/install/gcc-trunk/bin/gcc COLLECT_LTO_WRAPPER=/data/xieym/compiler/install/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /data/xieym/compiler/src/gcc/configure --enable-coverage --enable-checking --disable-multilib --disable-shared --disable-bootstrap --enable-languages=c,c++ --prefix=/data/xieym/compiler/install/gcc-trunk Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 16.0.0 20250428 (experimental) (GCC) $ gcc-trunk -std=c2x file.c -o /dev/null <source>:7:20: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:621 7 | fitness += fitness1_single(dna + i * 2, fitness_table[i]); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x2ea0055 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2eb7026 internal_error(char const*, ...) ???:0 0x95a5ad tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ???:0 0x1372490 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x1371e96 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x13745da gimplify_stmt(tree_node**, gimple**) ???:0 0x13720da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x13745da gimplify_stmt(tree_node**, gimple**) ???:0 0x1371933 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x13745da gimplify_stmt(tree_node**, gimple**) ???:0 0x1371933 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x13745da gimplify_stmt(tree_node**, gimple**) ???:0 0x13720da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ???:0 0x137a926 gimplify_body(tree_node*, bool) ???:0 0x137adec gimplify_function_tree(tree_node*) ???:0 0x117bec7 cgraph_node::analyze() ???:0 0x117f241 symbol_table::finalize_compilation_unit() ???:0 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. Compiler returned: 1 Is this bug the same as the one in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119649 Godbolt url: https://godbolt.org/z/j69dGoKq9