public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval,  at analyzer/store.cc:618
@ 2020-08-25  1:50 asolokha at gmx dot com
  2020-08-25 11:50 ` [Bug analyzer/96777] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-08-25  1:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96777
           Summary: [11 Regression] ICE in bind_compound_sval, at
                    analyzer/store.cc:618
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200823 snapshot (g:87c753ac241f25d222d46ba1ac66ceba89d6a200)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.c-torture/execute/20010924-1.c, w/ -fanalyzer:

struct ge {
  char au;
  char pz[];
};

struct ge tr = { 'X', 'X', };

int
main (void)
{
  return tr.pz[0] == 'X';
}

% gcc-11.0.0 -fanalyzer -c zlhfknsu.c
during IPA pass: analyzer
zlhfknsu.c: In function 'main':
zlhfknsu.c:11:15: internal compiler error: in bind_compound_sval, at
analyzer/store.cc:618
   11 |   return tr.pz[0] == 'X';
      |          ~~~~~^~~
0x72405f ana::binding_cluster::bind_compound_sval(ana::store_manager*,
ana::region const*, ana::compound_svalue const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/store.cc:618
0x110f518 ana::region_model::get_initial_value_for_global(ana::region const*)
const
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/region-model.cc:1258
0x11114ca ana::region_model::get_rvalue(tree_node*, ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/region-model.cc:1190
0x1113f87 ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/region-model.cc:562
0x10f4d92 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*) const
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:1029
0x10f5fdd ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:2526
0x10f6aca ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:2341
0x10f8bff ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:4107
0x10f981c ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/engine.cc:4175
0x10ee1d8 execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200823/work/gcc-11-20200823/gcc/analyzer/analyzer-pass.cc:84

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

* [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618
  2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
@ 2020-08-25 11:50 ` rguenth at gcc dot gnu.org
  2020-08-25 12:02 ` dmalcolm at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-25 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618
  2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
  2020-08-25 11:50 ` [Bug analyzer/96777] " rguenth at gcc dot gnu.org
@ 2020-08-25 12:02 ` dmalcolm at gcc dot gnu.org
  2020-08-25 13:52 ` [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type dmalcolm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-08-25 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-08-25

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this; confirmed.

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

* [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type
  2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
  2020-08-25 11:50 ` [Bug analyzer/96777] " rguenth at gcc dot gnu.org
  2020-08-25 12:02 ` dmalcolm at gcc dot gnu.org
@ 2020-08-25 13:52 ` dmalcolm at gcc dot gnu.org
  2020-08-26  1:39 ` cvs-commit at gcc dot gnu.org
  2020-08-26  1:47 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-08-25 13:52 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11 Regression] ICE in      |[11 Regression] ICE in
                   |bind_compound_sval, at      |bind_compound_sval with
                   |analyzer/store.cc:618       |initializer for incomplete
                   |                            |array type

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
The issue is a symbolic key within the binding_map, due to
  char pz[];
having incomplete type.

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

* [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type
  2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-08-25 13:52 ` [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type dmalcolm at gcc dot gnu.org
@ 2020-08-26  1:39 ` cvs-commit at gcc dot gnu.org
  2020-08-26  1:47 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-26  1:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:d88c8df70342fcd6817e23f243ff38d0fe42fc6b

commit r11-2854-gd88c8df70342fcd6817e23f243ff38d0fe42fc6b
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Tue Aug 25 09:26:05 2020 -0400

    analyzer: fix ICE on initializers for unsized array fields [PR96777]

    gcc/analyzer/ChangeLog:
            PR analyzer/96777
            * region-model.h (class compound_svalue): Document that all keys
            must be concrete.
            (compound_svalue::compound_svalue): Move definition to svalue.cc.
            * store.cc (binding_map::apply_ctor_to_region): Handle
            initializers for trailing arrays with incomplete size.
            * svalue.cc (compound_svalue::compound_svalue): Move definition
            here from region-model.h.  Add assertion that all keys are
            concrete.

    gcc/testsuite/ChangeLog:
            PR analyzer/96777
            * gcc.dg/analyzer/pr96777.c: New test.

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

* [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type
  2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-08-26  1:39 ` cvs-commit at gcc dot gnu.org
@ 2020-08-26  1:47 ` dmalcolm at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-08-26  1:47 UTC (permalink / raw)
  To: gcc-bugs

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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Should be fixed by the above commit.

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

end of thread, other threads:[~2020-08-26  1:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25  1:50 [Bug analyzer/96777] New: [11 Regression] ICE in bind_compound_sval, at analyzer/store.cc:618 asolokha at gmx dot com
2020-08-25 11:50 ` [Bug analyzer/96777] " rguenth at gcc dot gnu.org
2020-08-25 12:02 ` dmalcolm at gcc dot gnu.org
2020-08-25 13:52 ` [Bug analyzer/96777] [11 Regression] ICE in bind_compound_sval with initializer for incomplete array type dmalcolm at gcc dot gnu.org
2020-08-26  1:39 ` cvs-commit at gcc dot gnu.org
2020-08-26  1:47 ` dmalcolm 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).