https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111881
Bug ID: 111881 Summary: analyzer: ICE in ensure_closed, at analyzer/constraint-manager.cc:130 with -Ofast Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following fails (here on aarch64, but also on x86_64): $ cat t.c int int0(float sf1) { return sf1 <= 0 || sf1 >= 7 ? 0 : sf1; } $ ./xgcc -B . -c t.c -fanalyzer -Ofast during IPA pass: analyzer t.c: In function ‘int0’: t.c:1:55: internal compiler error: in ensure_closed, at analyzer/constraint-manager.cc:130 1 | int int0(float sf1) { return sf1 <= 0 || sf1 >= 7 ? 0 : sf1; } | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ 0x26060c5 ana::bound::ensure_closed(ana::bound_kind) /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:130 0x25fdb21 ana::bound::ensure_closed(ana::bound_kind) /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:121 0x25fdb21 ana::range::add_bound(ana::bound, ana::bound_kind) /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:309 0x25ff278 ana::constraint_manager::eval_condition(ana::equiv_class_id, tree_code, tree_node*) const /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:2605 0x25ff574 ana::constraint_manager::eval_condition(ana::svalue const*, tree_code, ana::svalue const*) const /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:2744 0x25ff6c8 ana::constraint_manager::add_constraint(ana::svalue const*, tree_code, ana::svalue const*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/constraint-manager.cc:1773 0x2659ef0 ana::region_model::add_constraint(ana::svalue const*, tree_code, ana::svalue const*, ana::region_model_context*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4565 0x265a087 ana::region_model::add_constraints_from_binop(ana::svalue const*, tree_code, ana::svalue const*, bool*, ana::region_model_context*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4482 0x2659ec4 ana::region_model::add_constraint(ana::svalue const*, tree_code, ana::svalue const*, ana::region_model_context*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4561 0x265a0db ana::region_model::add_constraints_from_binop(ana::svalue const*, tree_code, ana::svalue const*, bool*, ana::region_model_context*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4495 0x2659ec4 ana::region_model::add_constraint(ana::svalue const*, tree_code, ana::svalue const*, ana::region_model_context*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4561 0x265b271 ana::region_model::add_constraint(tree_node*, tree_code, tree_node*, ana::region_model_context*, std::unique_ptr<ana::rejected_constraint, std::default_delete<ana::rejected_constraint> >*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/region-model.cc:4593 0x263dc74 ana::program_state::on_edge(ana::exploded_graph&, ana::exploded_node*, ana::superedge const*, ana::uncertainty_t*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/program-state.cc:1148 0x262027e ana::exploded_graph::process_node(ana::exploded_node*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/engine.cc:4334 0x262132a ana::exploded_graph::process_worklist() /home/alecop01/toolchain/src/gcc/gcc/analyzer/engine.cc:3486 0x26238a1 ana::impl_run_checkers(ana::logger*) /home/alecop01/toolchain/src/gcc/gcc/analyzer/engine.cc:6154 0x2624756 ana::run_checkers() /home/alecop01/toolchain/src/gcc/gcc/analyzer/engine.cc:6242 0x25e52e8 execute /home/alecop01/toolchain/src/gcc/gcc/analyzer/analyzer-pass.cc:87 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.