public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107228] New: [13 Regression] ICE: in verify_range, at value-range.cc:1147 -O2
@ 2022-10-12  6:33 vsevolod.livinskiy at gmail dot com
  2022-10-12  7:48 ` [Bug tree-optimization/107228] " marxin at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vsevolod.livinskiy at gmail dot com @ 2022-10-12  6:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107228
           Summary: [13 Regression] ICE: in verify_range, at
                    value-range.cc:1147 -O2
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskiy at gmail dot com
  Target Milestone: ---

Link to the Compiler Explorer: https://godbolt.org/z/fsGf47Wfv

Reproducer:
bool a;
char b;
void fn1(int d, short x[], bool y[]) {
  for (short i = 0; i < d; i = 0) {
    if ((x[i] + x[i]) ^ !y[i])
      a = 0;
    b = y[i];
  }
}

Error:
>$ g++ -c -O2 func.cpp 
during GIMPLE pass: dom
func.cpp: In function 'void fn1(int, short int*, bool*)':
func.cpp:3:6: internal compiler error: in verify_range, at value-range.cc:1147
    3 | void fn1(int d, short x[], bool y[]) {
      |      ^~~
0x90038d irange::verify_range()
        /testing/gcc/gcc_src_master/gcc/value-range.cc:1147
0x1588a87 irange::operator=(irange const&)
        /testing/gcc/gcc_src_master/gcc/value-range.cc:818
0x158bd67 irange::invert()
        /testing/gcc/gcc_src_master/gcc/value-range.cc:2799
0x2178487 operator_logical_not::fold_range(irange&, tree_node*, irange const&,
irange const&, relation_kind_t) const
        /testing/gcc/gcc_src_master/gcc/range-op.cc:3614
0x2074635 gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:1086
0x2073c8d gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:692
0x20746af gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:1140
0x2073c8d gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:692
0x2074fc0 gori_compute::compute_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:1228
0x20734e5 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:694
0x2077158 gori_compute::outgoing_edge_range_p(vrange&, edge_def*, tree_node*,
range_query&)
        /testing/gcc/gcc_src_master/gcc/gimple-range-gori.cc:1358
0x20679ec ranger_cache::edge_range(vrange&, edge_def*, tree_node*,
ranger_cache::rfd_mode)
        /testing/gcc/gcc_src_master/gcc/gimple-range-cache.cc:964
0x2063d4b gimple_ranger::range_on_edge(vrange&, edge_def*, tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:242
0x206d86b fold_using_range::range_of_phi(vrange&, gphi*, fur_source&)
        /testing/gcc/gcc_src_master/gcc/gimple-range-fold.cc:750
0x20706b8 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-fold.cc:491
0x2062de4 gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:258
0x2062de4 gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:319
0x20639c0 gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:126
0x1398aaf cprop_operand
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:1968
0x139aa61 cprop_into_stmt
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:2045
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

gcc version 13.0.0 20221011 (0ecd0f1cc6f8f3ba818946a42b22c2ab61f46825)

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

* [Bug tree-optimization/107228] [13 Regression] ICE: in verify_range, at value-range.cc:1147 -O2
  2022-10-12  6:33 [Bug tree-optimization/107228] New: [13 Regression] ICE: in verify_range, at value-range.cc:1147 -O2 vsevolod.livinskiy at gmail dot com
@ 2022-10-12  7:48 ` marxin at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-12  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Dup.

*** This bug has been marked as a duplicate of bug 107195 ***

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

end of thread, other threads:[~2022-10-12  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12  6:33 [Bug tree-optimization/107228] New: [13 Regression] ICE: in verify_range, at value-range.cc:1147 -O2 vsevolod.livinskiy at gmail dot com
2022-10-12  7:48 ` [Bug tree-optimization/107228] " marxin 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).