https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115489
Bug ID: 115489 Summary: ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc:589 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- Target: x86_64 Created attachment 58427 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58427&action=edit c testcase ******************************************************************************* OS and Platform: # uname -a Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ******************************************************************************* # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /root/gdbtest/gcc/obj/../gcc/configure --prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240509 (experimental) (GCC) ******************************************************************************* Program: Please refer to the attachment. ******************************************************************************* Command Lines: # gcc bug892.c -O3 -Wall -Wextra -pedantic -fsanitize=address,undefined -fstack-protector-strong -march=native -fvisibility=hidden -std=c17 -c -o bug892.o ........................................ bug892.c: In function ‘func_64’: bug892.c:347:17: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in create_tmp_from_val, at gimplify.cc:589 347 | l_724[2][1] &= (safe_rshift_func_int16_t_s_s((safe_mul_func_int16_t_s_s(l_705, (safe_sub_func_uint64_t_u_u(8UL, (l_709 = ((*l_708) = 0L)))))), (((safe_mul_func_uint16_t_u_u(((**g_601)++), (--(*l_714)))) & (safe_sub_func_int16_t_s_s((&g_161 == (l_719 = (void*)0)), ((void*)0 != g_720)))) != (*g_135)))); | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x8bbf2a tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:9045 0x7f33a6 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /root/gdbtest/gcc/obj/../gcc/gcc/tree.h:3779 0x7f33a6 create_tmp_from_val /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:589 0x7f33a6 lookup_tmp_var /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:612 0xd68b1a internal_get_tmp_var /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:667 0xd6ecce get_initialized_tmp_var(tree_node*, gimple**, gimple**, bool) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:711 0xd6ecce gimplify_save_expr /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:6817 0xd640dd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:18188 0xd85c17 gimplify_stmt(tree_node**, gimple**) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:7581 0xd85c17 gimplify_compound_expr /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:6766 0xd63f7b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:17877 0xd663a6 gimplify_stmt(tree_node**, gimple**) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:7581 0xd64e33 gimplify_statement_list /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:2249 0xd64e33 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:18332 0xd663a6 gimplify_stmt(tree_node**, gimple**) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:7581 0xd674a6 gimplify_bind_expr /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:1641 0xd64064 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:18088 0xd663a6 gimplify_stmt(tree_node**, gimple**) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:7581 0xd64e33 gimplify_statement_list /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:2249 0xd64e33 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /root/gdbtest/gcc/obj/../gcc/gcc/gimplify.cc:18332 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. ******************************************************************************* Also ICE on trunk, compiler explorer:https://godbolt.org/z/dq1xdovja *******************************************************************************