https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109639
Bug ID: 109639 Summary: [14 regression] Internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Host: aarch64-unknown-linux-gnu Created attachment 54928 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54928&action=edit ccwjJian.i.xz Hit this w/ binutils-2.40 (and 2.39) with gcc ...: ``` libtool: compile: aarch64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-devel/binutils-2.40-r4/work/binutils-2.40/bfd -DBINDIR=\"/usr/aarch64-unknown-linux-gnu/binutils-bin/2.40\" -DLIBDIR=\"/usr/lib64/binutils/aarch64-unknown-linux-gnu/2.40\" -I. -I/var/tmp/portage/sys-devel/binutils-2.40-r4/work/binutils-2.40/bfd -I/var/tmp/portage/sys-devel/binutils-2.40-r4/work/binutils-2.40/bfd/../include -DHAVE_aarch64_elf64_le_vec -DHAVE_aarch64_elf64_be_vec -DHAVE_aarch64_elf32_le_vec -DHAVE_aarch64_elf32_be_vec -DHAVE_arm_elf32_le_vec -DHAVE_arm_elf32_be_vec -DHAVE_aarch64_pei_le_vec -DHAVE_aarch64_pe_le_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -O2 -pipe -mcpu=native -MT elf32-aarch64.lo -MD -MP -MF .deps/elf32-aarch64.Tpo -c elf32-aarch64.c -fPIC -DPIC -o .libs/elf32-aarch64.o during IPA pass: inline elfnn-aarch64.c:10242: internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 0x6c91af tree_check_failed(tree_node const*, char const*, int, char const*, ...) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.cc:8869 0x6aec5b tree_int_cst_elt_check(tree_node const*, int, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:3728 0x83cf9b tree_int_cst_elt_check(tree_node const*, int, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:6285 0x83cf9b wi::to_wide(tree_node const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:6283 0x1223b7f irange::varying_compatible_p() const /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/value-range.h:739 0x12170e7 irange::normalize_kind() /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/value-range.h:1009 0x12170e7 irange::irange_set(tree_node*, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/value-range.cc:966 0xb90b77 int_range<2u>::int_range(tree_node*, tree_node*, value_range_kind) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/value-range.h:863 0xb90b77 evaluate_conditions_for_known_args /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-fnsummary.cc:503 0xbaa59b do_estimate_edge_size(cgraph_edge*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline-analysis.cc:335 0xbad283 estimate_edge_size(cgraph_edge*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline.h:79 0xbad283 estimate_edge_growth(cgraph_edge*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline.h:100 0xbaba6f do_estimate_growth_1 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline-analysis.cc:434 0xbabbb3 cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*, void*), void*, bool) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cgraph.h:3412 0xbabbb3 estimate_growth(cgraph_node*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline-analysis.cc:472 0x1e72b47 inline_small_functions /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline.cc:2042 0x1e72b47 ipa_inline /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline.cc:2811 0x1e72b47 execute /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/ipa-inline.cc:3210 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. make[4]: *** [Makefile:1776: elf32-aarch64.lo] Error 1 ``` ---- ``` $ gcc -O2 -c ccwjJian.i during IPA pass: inline elfnn-aarch64.c:10242: internal compiler error: tree check: expected integer_cst, have addr_expr in to_wide, at tree.h:6283 0x6c91af tree_check_failed(tree_node const*, char const*, int, char const*, ...) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.cc:8869 0x6aec5b tree_int_cst_elt_check(tree_node const*, int, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:3728 0x83cf9b tree_int_cst_elt_check(tree_node const*, int, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:6285 [...] ``` ``` gcc (Gentoo 14.0.0.9999 p, commit 7546d8be5a8ae93e81535644c2578807db276ab6) 14.0.0 20230426 (experimental) Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ```