public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909
@ 2022-07-04 11:06 asolokha at gmx dot com
  2022-07-04 11:14 ` [Bug analyzer/106181] " tlange at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-07-04 11:06 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/106181] [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909
  2022-07-04 11:06 [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909 asolokha at gmx dot com
@ 2022-07-04 11:14 ` tlange at gcc dot gnu.org
  2022-07-04 11:18 ` tlange at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tlange at gcc dot gnu.org @ 2022-07-04 11:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106181

Tim Lange <tlange at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-07-04
           Assignee|dmalcolm at gcc dot gnu.org        |tlange at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/106181] [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909
  2022-07-04 11:06 [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909 asolokha at gmx dot com
  2022-07-04 11:14 ` [Bug analyzer/106181] " tlange at gcc dot gnu.org
@ 2022-07-04 11:18 ` tlange at gcc dot gnu.org
  2022-07-04 11:58 ` rguenth at gcc dot gnu.org
  2022-07-05 19:52 ` tlange at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: tlange at gcc dot gnu.org @ 2022-07-04 11:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106181

--- Comment #1 from Tim Lange <tlange at gcc dot gnu.org> ---
Can confirm. I've missed that I might receive non-ints from get_capacity. I'm
working on a fix right now.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/106181] [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909
  2022-07-04 11:06 [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909 asolokha at gmx dot com
  2022-07-04 11:14 ` [Bug analyzer/106181] " tlange at gcc dot gnu.org
  2022-07-04 11:18 ` tlange at gcc dot gnu.org
@ 2022-07-04 11:58 ` rguenth at gcc dot gnu.org
  2022-07-05 19:52 ` tlange at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-04 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106181

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug analyzer/106181] [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909
  2022-07-04 11:06 [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-07-04 11:58 ` rguenth at gcc dot gnu.org
@ 2022-07-05 19:52 ` tlange at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: tlange at gcc dot gnu.org @ 2022-07-05 19:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106181

--- Comment #2 from Tim Lange <tlange at gcc dot gnu.org> ---
Posted a fix to the mailing list here:
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/597871.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-05 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 11:06 [Bug analyzer/106181] New: [13 Regression] ICE in capacity_compatible_with_type, at analyzer/region-model.cc:2909 asolokha at gmx dot com
2022-07-04 11:14 ` [Bug analyzer/106181] " tlange at gcc dot gnu.org
2022-07-04 11:18 ` tlange at gcc dot gnu.org
2022-07-04 11:58 ` rguenth at gcc dot gnu.org
2022-07-05 19:52 ` tlange at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).