https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106181
Bug ID: 106181
Summary: [13 Regression] ICE in capacity_compatible_with_type,
at analyzer/region-model.cc:2909
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: asolokha at gmx dot com
CC: tlange at gcc dot gnu.org
Target Milestone: ---
gcc 13.0.0 20220703 snapshot (g:f3a5e75cb66dc96efca7d494fe6060746c88acb1) ICEs
when compiling the following testcase w/ -fanalyzer:
int *
foo (int x)
{
return __builtin_calloc (x * 1.1, 1);
}
% gcc-13.0.0 -fanalyzer -c mjzcnnsr.c
during IPA pass: analyzer
mjzcnnsr.c: In function 'foo':
mjzcnnsr.c:4:10: internal compiler error: in capacity_compatible_with_type, at
analyzer/region-model.cc:2909
4 | return __builtin_calloc (x * 1.1, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x7c0a27 capacity_compatible_with_type
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:2909
0x12d174a capacity_compatible_with_type
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:2923
0x12d174a ana::size_visitor::visit_constant_svalue(ana::constant_svalue const*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:2948
0x131e9a8 ana::binop_svalue::accept(ana::visitor*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/svalue.cc:1229
0x131e958 ana::unaryop_svalue::accept(ana::visitor*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/svalue.cc:1126
0x12c36db ana::size_visitor::size_visitor(tree_node*, ana::svalue const*,
ana::constraint_manager*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:2938
0x12c36db ana::region_model::check_region_size(ana::region const*, ana::svalue
const*, ana::region_model_context*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:3157
0x12c3a10 ana::region_model::check_region_size(ana::region const*, ana::svalue
const*, ana::region_model_context*) const
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:3104
0x12c3a10 ana::region_model::set_value(ana::region const*, ana::svalue const*,
ana::region_model_context*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:3181
0x12c6666 ana::region_model::on_call_pre(gcall const*,
ana::region_model_context*, bool*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:1450
0x12cf4f2 ana::region_model::on_stmt_pre(gimple const*, bool*, bool*,
ana::region_model_context*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/region-model.cc:1214
0x129c2c8 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::uncertainty_t*,
ana::path_context*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/engine.cc:1404
0x129f18c ana::exploded_graph::process_node(ana::exploded_node*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/engine.cc:3802
0x12a011a ana::exploded_graph::process_worklist()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/engine.cc:3245
0x12a27cc ana::impl_run_checkers(ana::logger*)
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/engine.cc:5834
0x12a381e ana::run_checkers()
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/engine.cc:5908
0x1292988 execute
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220703/work/gcc-13-20220703/gcc/analyzer/analyzer-pass.cc:87
The triggering assert has been introduced in commit r13-1405.