https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117758
Bug ID: 117758 Summary: ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in create_tmp_from_val, at gimplify.cc:592 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: xieym3 at zohomail dot com Target Milestone: --- $ cat 2.c int main(int argc, char *argv[]) { void *p10, *p165, *p85, *p420, *p210, *p105, *p496, *p144; char *b = p210, s = p105, f = p420; char *t = p105, a = p10; f -= lseek((long)&t, lseek(0, lseek((long)&p10, f, t, b, s)), p165, p85, f, a, a, p144, p496); char *a = argv[0]; } $ gcc-trunk -v Using built-in specs. COLLECT_GCC=/data/xieym/exp/gcc/test_data/gcc-latest-install/bin/gcc COLLECT_LTO_WRAPPER=/data/xieym/exp/gcc/test_data/gcc-latest-install/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /data/xieym/exp/gcc/test_data/gcc-latest-src/configure --enable-coverage --enable-checking --disable-multilib --disable-shared --disable-bootstrap --enable-languages=c,c++ --prefix=/data/xieym/exp/gcc/test_data/gcc-latest-install Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20241123 (experimental) (GCC) $ gcc-trunk -x c -std=c2x -c 2.c -o /dev/null 2.c: In function ‘main’: 2.c:3:23: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 3 | char *b = p210, s = p105, f = p420; | ^~~~ 2.c:3:33: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 3 | char *b = p210, s = p105, f = p420; | ^~~~ 2.c:4:23: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion] 4 | char *t = p105, a = p10; | ^~~ 2.c:5:8: error: implicit declaration of function ‘lseek’ [-Wimplicit-function-declaration] 5 | f -= lseek((long)&t, lseek(0, lseek((long)&p10, f, t, b, s)), p165, p85, f, a, | ^~~~~ 2.c:7:9: error: conflicting types for ‘a’; have ‘char *’ 7 | char *a = argv[0]; | ^ 2.c:4:19: note: previous definition of ‘a’ with type ‘char’ 4 | char *t = p105, a = p10; | ^ 2.c:5:8: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in create_tmp_from_val, at gimplify.cc:592 5 | f -= lseek((long)&t, lseek(0, lseek((long)&p10, f, t, b, s)), p165, p85, f, a, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 | a, p144, p496); | ~~~~~~~~~~~~~~ 0x567214e internal_error(char const*, ...) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/diagnostic-global-context.cc:517 0x27bd5cd tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/tree.cc:9081 0xe09b06 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/tree.h:3817 0x17a5482 create_tmp_from_val /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:592 0x17a561b lookup_tmp_var /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:615 0x17a5b9f internal_get_tmp_var /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:670 0x17a6017 get_initialized_tmp_var(tree_node*, gimple**, gimple**, bool) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:714 0x17cdc85 gimplify_save_expr /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7066 0x182ac64 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:18957 0x17d2b23 gimplify_stmt(tree_node**, gimple**) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7839 0x17cd91c gimplify_compound_expr /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7015 0x1828bbd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:18646 0x17d2b23 gimplify_stmt(tree_node**, gimple**) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7839 0x17b01c1 gimplify_statement_list /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:2256 0x182c0de gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:19107 0x17d2b23 gimplify_stmt(tree_node**, gimple**) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7839 0x17ac306 gimplify_bind_expr /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:1651 0x182a286 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:18857 0x17d2b23 gimplify_stmt(tree_node**, gimple**) /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:7839 0x17b01c1 gimplify_statement_list /data/xieym/exp/gcc/test_data/gcc-latest-src/gcc/gimplify.cc:2256 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.