https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109834
Bug ID: 109834 Summary: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (ssa_name) in gimple_simplify_191 when building harfbuzz 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: --- Created attachment 55066 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55066&action=edit hb-subset.cc.ii ``` FAILED: src/libharfbuzz-subset.so.0.60730.0.p/hb-subset.cc.o aarch64-unknown-linux-gnu-g++ -Isrc/libharfbuzz-subset.so.0.60730.0.p -Isrc -I../harfbuzz-7.3.0/src -I. -I../harfbuzz-7.3.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++11 -fno-exceptions -fno-rtti -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DU_DISABLE_RENAMING=1 -DHAVE_CONFIG_H -O3 -pipe -mcpu=native -DHB_NDEBUG -fPIC -Wno-non-virtual-dtor -MD -MQ src/libharfbuzz-subset.so.0.60730.0.p/hb-subset.cc.o -MF src/libharfbuzz-subset.so.0.60730.0.p/hb-subset.cc.o.d -o src/libharfbuzz-subset.so.0.60730.0.p/hb-subset.cc.o -c ../harfbuzz-7.3.0/src/hb-subset.cc during GIMPLE pass: forwprop ../harfbuzz-7.3.0/src/hb-subset.cc: In member function ‘unsigned int OT::Layout::GPOS_impl::ValueFormat::get_len() const’: ../harfbuzz-7.3.0/src/hb-subset.cc:639:1: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (ssa_name) in gimple_simplify_191, at gimple-match-2.cc:1184 639 | } | ^ 0x72bcb7 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.cc:8949 0x224af97 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree.h:3663 0x224af97 gimple_simplify_191(gimple_match_op*, gimple**, tree_node* (*)(tree_node*), tree_node*, tree_node**, combined_fn, combined_fn) /usr/src/debug/sys-devel/gcc-14.0.0.9999/build/gcc/gimple-match-2.cc:1184 0x179e3d7 gimple_simplify_CFN_BUILT_IN_POPCOUNT(gimple_match_op*, gimple**, tree_node* (*)(tree_node*), code_helper, tree_node*, tree_node*) /usr/src/debug/sys-devel/gcc-14.0.0.9999/build/gcc/gimple-match-8.cc:5618 0x186dd1b gimple_resimplify1 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-exports.cc:890 0x186e71f gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-match-exports.cc:834 0xdff7e3 fold_stmt_1 /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/gimple-fold.cc:6251 0x134facb execute /usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa-forwprop.cc:3919 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. ``` ``` gcc (Gentoo 14.0.0.9999 p, commit 29d805847dc870c92f705ed9c5e7eac955c7e7d4) 14.0.0 20230512 (experimental) f52bf590e3336979ee47658d74a8478e3234da9b 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. ``` I can reproduce it with `aarch64-unknown-linux-gnu-g++ -std=c++11 -c hb-subset.cc.ii -O2`. I've got a bunch of these and just picked Harfbuzz at random.