https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110219
Bug ID: 110219 Summary: [14 Regression] ICE: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 with _Complex float to int Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Created attachment 55307 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55307&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -Os -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre testcase.c during GIMPLE pass: evrp testcase.c: In function 'foo': testcase.c:8:1: internal compiler error: tree check: expected integer_cst, have real_cst in to_wide, at tree.h:6314 8 | } | ^ 0x851b7a tree_check_failed(tree_node const*, char const*, int, char const*, ...) /repo/gcc-trunk/gcc/tree.cc:8899 0xd15336 tree_check(tree_node const*, char const*, int, char const*, tree_code) /repo/gcc-trunk/gcc/tree.h:3826 0xd15336 wi::to_wide(tree_node const*) /repo/gcc-trunk/gcc/tree.h:6314 0xd159c2 wi::to_wide(tree_node const*) /repo/gcc-trunk/gcc/tree.h:3570 0xd159c2 adjust_realpart_expr /repo/gcc-trunk/gcc/gimple-range-fold.cc:538 0xd159c2 gimple_range_adjustment /repo/gcc-trunk/gcc/gimple-range-fold.cc:563 0xd159c2 fold_using_range::range_of_range_op(vrange&, gimple_range_op_handler&, fur_source&) /repo/gcc-trunk/gcc/gimple-range-fold.cc:741 0x23c54b6 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*) /repo/gcc-trunk/gcc/gimple-range-fold.cc:594 0x23c597c fold_range(vrange&, gimple*, range_query*) /repo/gcc-trunk/gcc/gimple-range-fold.cc:318 0x23be761 ranger_cache::get_global_range(vrange&, tree_node*, bool&) /repo/gcc-trunk/gcc/gimple-range-cache.cc:1010 0x23b5bcc gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*) /repo/gcc-trunk/gcc/gimple-range.cc:311 0x1737079 range_query::value_of_stmt(gimple*, tree_node*) /repo/gcc-trunk/gcc/value-query.cc:134 0x15febbf substitute_and_fold_dom_walker::before_dom_children(basic_block_def*) /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:792 0x238035e dom_walker::walk(basic_block_def*) /repo/gcc-trunk/gcc/domwalk.cc:311 0x15fdd05 substitute_and_fold_engine::substitute_and_fold(basic_block_def*) /repo/gcc-trunk/gcc/tree-ssa-propagate.cc:971 0x1702139 execute_ranger_vrp(function*, bool, bool) /repo/gcc-trunk/gcc/tree-vrp.cc:998 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-1694-20230611112131-g20643513b8d-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-1694-20230611112131-g20643513b8d-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20230611 (experimental) (GCC)