https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122502
--- Comment #13 from Sergei Trofimovich <slyfox at gcc dot gnu.org> --- (In reply to GCC Commits from comment #10) > The master branch has been updated by Richard Biener <[email protected]>: > > https://gcc.gnu.org/g:c070cfb7b4f7850ace889725b4f788f4ae769840 Another example seemingly not fixed by this change from `ffmpeg-8.0`: // $ cat softfloat.c.c typedef struct { int mant; int exp } SoftFloat; SoftFloat __trans_tmp_8, main___trans_tmp_5; static SoftFloat av_normalize_sf(SoftFloat a) { while (a.mant + 536870911 < 1073741823) { a.mant += a.mant; a.exp -= 1; } return a; } void main() { main___trans_tmp_5 = av_normalize_sf((SoftFloat){1, 29 + 1}); SoftFloat sf1 = main___trans_tmp_5; for (;;) { int t = main___trans_tmp_5.exp - sf1.exp; if (t < 2) sf1 = __trans_tmp_8; } } gcc/xgcc -Bgcc -c softfloat.c.c -O2 softfloat.c.c:4:1: warning: no semicolon at end of struct or union 4 | } SoftFloat; | ^ during GIMPLE pass: sccp softfloat.c.c: In function ‘main’: softfloat.c.c:13:6: internal compiler error: Segmentation fault 13 | void main() { | ^~~~ 0x26506c4 diagnostics::context::diagnostic_impl(rich_location*, diagnostics::metadata const*, diagnostics::option_id, char const*, __va_list_tag (*) [1], diagnostics::kind) ???:0 0x26429a0 internal_error(char const*, ...) ???:0 0x10883f5 crash_signal(int) ???:0 0xc7523a gimple_infer_range::gimple_infer_range(gimple*, range_query*, bool) ???:0 0xc77427 infer_range_manager::register_all_uses(tree_node*) ???:0 0xc774ed infer_range_manager::has_range_p(basic_block_def*, tree_node*) ???:0 0xc7655e infer_range_manager::maybe_adjust_range(vrange&, tree_node*, basic_block_def*) ???:0 0xc55c7b gimple_ranger::range_on_edge(vrange&, edge_def*, tree_node*) ???:0 0xc5fe52 fur_edge::get_operand(vrange&, tree_node*) ???:0 0xc601cf fur_stmt::get_phi_operand(vrange&, tree_node*, edge_def*) ???:0 0xc618b8 fold_using_range::range_of_phi(vrange&, gphi*, fur_source&) ???:0 0xc68afe fold_using_range::fold_stmt(vrange&, gimple*, fur_source&, tree_node*) ???:0 0xc51f42 gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*) ???:0 0xc5360c gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*) ???:0 0xc5565e gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*) ???:0 0x137dfcf ssa_name_has_boolean_range(tree_node*, gimple*) ???:0 0x191f8d7 gimple_simplify_MINUS_EXPR(gimple_match_op*, gimple**, tree_node* (*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*) ???:0 0x197cd6f gimple_simplify(gimple_match_op*, gimple**, tree_node* (*)(tree_node*), code_helper, tree_node*, tree_node*, tree_node*) ???:0 0x1adeea6 gimple_resimplify2(gimple**, gimple_match_op*, tree_node* (*)(tree_node*)) ???:0 0x1adefb6 gimple_match_op::resimplify(gimple**, tree_node* (*)(tree_node*)) ???:0 $ gcc/xgcc -Bgcc -v Reading specs from gcc/specs COLLECT_GCC=gcc/xgcc COLLECT_LTO_WRAPPER=gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap --disable-lto --disable-libsanitizer --enable-languages=c CFLAGS='-O1 -g0' CXXFLAGS='-O1 -g0' LDFLAGS='-O1 -g0' Thread model: posix Supported LTO compression algorithms: zlib gcc version 16.0.0 20251031 (experimental) (GCC)
