public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133
@ 2021-07-22  2:49 asolokha at gmx dot com
  2021-07-22  6:56 ` [Bug analyzer/101570] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2021-07-22  2:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101570
           Summary: [12 Regression] ICE in
                    maybe_reconstruct_from_def_stmt, at
                    analyzer/analyzer.cc:133
           Product: gcc
           Version: unknown
            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
  Target Milestone: ---

gcc-12.0.0-alpha20210718 snapshot (g:6ae8aac19cdbdbd96d90f86e4d8505fe121bdf06)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.dg/torture/pr70370.c, w/ -fanalyzer:

void
test2 (_Complex double f)
{
  __asm__ ("" : "=r" (__real f));
}

% gcc-12.0.0 -fanalyzer -c erc6pp1g.c
during IPA pass: analyzer
erc6pp1g.c: In function 'test2':
erc6pp1g.c:4:3: internal compiler error: in maybe_reconstruct_from_def_stmt, at
analyzer/analyzer.cc:133
    4 |   __asm__ ("" : "=r" (__real f));
      |   ^~~~~~~
0x7ff6f0 maybe_reconstruct_from_def_stmt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer.cc:133
0x7ff6f0 fixup_tree_for_diagnostic_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer.cc:180
0x1a32b3a fixup_tree_for_diagnostic_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/hash-table.h:687
0x1a32b3a ana::fixup_tree_for_diagnostic(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer.cc:201
0x120761f ana::region_model::check_for_poison(ana::svalue const*, tree_node*,
ana::region_model_context*) const
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:839
0x120ba80 ana::region_model::get_rvalue(tree_node*, ana::region_model_context*)
const
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:1842
0x120ba80 ana::region_model::get_gassign_result(gassign const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:765
0x120c62c ana::region_model::on_assignment(gassign const*,
ana::region_model_context*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/region-model.cc:869
0x11e998d ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::uncertainty_t*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:1223
0x11ebf22 ana::exploded_graph::process_node(ana::exploded_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:3098
0x11eca8a ana::exploded_graph::process_worklist()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:2684
0x11eeee5 ana::impl_run_checkers(ana::logger*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:4972
0x11efd80 ana::run_checkers()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/engine.cc:5043
0x11e0e48 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210718/work/gcc-12-20210718/gcc/analyzer/analyzer-pass.cc:87

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

* [Bug analyzer/101570] [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133
  2021-07-22  2:49 [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133 asolokha at gmx dot com
@ 2021-07-22  6:56 ` rguenth at gcc dot gnu.org
  2021-07-22 22:31 ` dmalcolm at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-22  6:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |12.0
   Target Milestone|---                         |12.0

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

* [Bug analyzer/101570] [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133
  2021-07-22  2:49 [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133 asolokha at gmx dot com
  2021-07-22  6:56 ` [Bug analyzer/101570] " rguenth at gcc dot gnu.org
@ 2021-07-22 22:31 ` dmalcolm at gcc dot gnu.org
  2021-08-04 22:22 ` cvs-commit at gcc dot gnu.org
  2021-08-04 22:28 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-07-22 22:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-22
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

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

Confirmed; I'm working on a fix.

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

* [Bug analyzer/101570] [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133
  2021-07-22  2:49 [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133 asolokha at gmx dot com
  2021-07-22  6:56 ` [Bug analyzer/101570] " rguenth at gcc dot gnu.org
  2021-07-22 22:31 ` dmalcolm at gcc dot gnu.org
@ 2021-08-04 22:22 ` cvs-commit at gcc dot gnu.org
  2021-08-04 22:28 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-04 22:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:ded2c2c068f6f2825474758cb03a05070a5837e8

commit r12-2749-gded2c2c068f6f2825474758cb03a05070a5837e8
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Wed Aug 4 18:21:21 2021 -0400

    analyzer: initial implementation of asm support [PR101570]

    gcc/ChangeLog:
            PR analyzer/101570
            * Makefile.in (ANALYZER_OBJS): Add analyzer/region-model-asm.o.

    gcc/analyzer/ChangeLog:
            PR analyzer/101570
            * analyzer.cc (maybe_reconstruct_from_def_stmt): Add GIMPLE_ASM
            case.
            * analyzer.h (class asm_output_svalue): New forward decl.
            (class reachable_regions): New forward decl.
            * complexity.cc (complexity::from_vec_svalue): New.
            * complexity.h (complexity::from_vec_svalue): New decl.
            * engine.cc (feasibility_state::maybe_update_for_edge): Handle
            asm stmts by calling on_asm_stmt.
            * region-model-asm.cc: New file.
            * region-model-manager.cc
            (region_model_manager::maybe_fold_asm_output_svalue): New.
            (region_model_manager::get_or_create_asm_output_svalue): New.
            (region_model_manager::log_stats): Log m_asm_output_values_map.
            * region-model.cc (region_model::on_stmt_pre): Handle GIMPLE_ASM.
            * region-model.h (visitor::visit_asm_output_svalue): New.
            (region_model_manager::get_or_create_asm_output_svalue): New decl.
            (region_model_manager::maybe_fold_asm_output_svalue): New decl.
            (region_model_manager::asm_output_values_map_t): New typedef.
            (region_model_manager::m_asm_output_values_map): New field.
            (region_model::on_asm_stmt): New.
            * store.cc (binding_cluster::on_asm): New.
            * store.h (binding_cluster::on_asm): New decl.
            * svalue.cc (svalue::cmp_ptr): Handle SK_ASM_OUTPUT.
            (asm_output_svalue::dump_to_pp): New.
            (asm_output_svalue::dump_input): New.
            (asm_output_svalue::input_idx_to_asm_idx): New.
            (asm_output_svalue::accept): New.
            * svalue.h (enum svalue_kind): Add SK_ASM_OUTPUT.
            (svalue::dyn_cast_asm_output_svalue): New.
            (class asm_output_svalue): New.
            (is_a_helper <const asm_output_svalue *>::test): New.
            (struct default_hash_traits<asm_output_svalue::key_t>): New.

    gcc/testsuite/ChangeLog:
            PR analyzer/101570
            * gcc.dg/analyzer/asm-x86-1.c: New test.
            * gcc.dg/analyzer/asm-x86-lp64-1.c: New test.
            * gcc.dg/analyzer/asm-x86-lp64-2.c: New test.
            * gcc.dg/analyzer/pr101570.c: New test.
            * gcc.dg/analyzer/torture/asm-x86-linux-array_index_mask_nospec.c:
            New test.
            * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-1.c: New
            test.
            * gcc.dg/analyzer/torture/asm-x86-linux-cpuid-paravirt-2.c: New
            test.
            * gcc.dg/analyzer/torture/asm-x86-linux-cpuid.c: New test.
            * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr-paravirt.c: New
            test.
            * gcc.dg/analyzer/torture/asm-x86-linux-rdmsr.c: New test.
            * gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c:
            New test.
            *
gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-reduced.c:
            New test.

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

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

* [Bug analyzer/101570] [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133
  2021-07-22  2:49 [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-08-04 22:22 ` cvs-commit at gcc dot gnu.org
@ 2021-08-04 22:28 ` dmalcolm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2021-08-04 22:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2021-08-04 22:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22  2:49 [Bug analyzer/101570] New: [12 Regression] ICE in maybe_reconstruct_from_def_stmt, at analyzer/analyzer.cc:133 asolokha at gmx dot com
2021-07-22  6:56 ` [Bug analyzer/101570] " rguenth at gcc dot gnu.org
2021-07-22 22:31 ` dmalcolm at gcc dot gnu.org
2021-08-04 22:22 ` cvs-commit at gcc dot gnu.org
2021-08-04 22:28 ` 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).