public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os
@ 2020-11-29 13:00 haoxintu at gmail dot com
  2020-11-29 13:17 ` [Bug c/98051] " haoxintu at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: haoxintu at gmail dot com @ 2020-11-29 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98051
           Summary: ICE in logical_combine, at gimple-range-gori.cc:754 in
                    O2-Os
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi all. The small.cc makes GCC-trunk crash under O2~Os, while O0-O1 is fine.

$cat small.c
#include <stdint.h>
void a(int b) {
  uint8_t c;
  int32_t d;
  for (;;)
    if (c >= ((b == (d == d)) > !b)) {
      int32_t e[] = {};
    }
}

$gcc-trunk -O2 -c small.c
during GIMPLE pass: evrp
small.c: In function ‘a’:
small.c:9:1: internal compiler error: in logical_combine, at
gimple-range-gori.cc:754
    9 | }
      | ^
0x6667df gori_compute::logical_combine(irange&, tree_code, irange const&,
tf_range const&, tf_range const&)
        ../../gcc/gimple-range-gori.cc:754
0x14d37cc gori_compute_cache::cache_stmt(gimple*)
        ../../gcc/gimple-range-gori.cc:1314
0x14d3bd1 gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
        ../../gcc/gimple-range-gori.cc:1279
0x14d15a1 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc/gimple-range-gori.cc:903
0x14d3b7c gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc/gimple-range-gori.cc:575
0x14d3b7c gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
        ../../gcc/gimple-range-gori.cc:1276
0x14d16ba gori_compute::compute_operand2_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc/gimple-range-gori.cc:936
0x14d3b7c gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*)
        ../../gcc/gimple-range-gori.cc:575
0x14d3b7c gori_compute_cache::compute_operand_range(irange&, gimple*, irange
const&, tree_node*)
        ../../gcc/gimple-range-gori.cc:1276
0x14d25a7 gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*)
        ../../gcc/gimple-range-gori.cc:1001
0x14cf26c ranger_cache::iterative_cache_update(tree_node*)
        ../../gcc/gimple-range-cache.cc:636
0x14cfc0c ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
        ../../gcc/gimple-range-cache.cc:808
0x14d01bf ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
        ../../gcc/gimple-range-cache.cc:589
0x14c935a gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
        ../../gcc/gimple-range.cc:875
0x14c98a8 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        ../../gcc/gimple-range.cc:846
0x14caad9 gimple_ranger::range_of_range_op(irange&, gimple*)
        ../../gcc/gimple-range.cc:418
0x14cce97 gimple_ranger::calc_stmt(irange&, gimple*, tree_node*)
        ../../gcc/gimple-range.cc:369
0x14cd355 gimple_ranger::range_of_stmt(irange&, gimple*, tree_node*)
        ../../gcc/gimple-range.cc:952
0x14c9918 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        ../../gcc/gimple-range.cc:843
0xdc69c5 range_query::value_of_expr(tree_node*, gimple*)
        ../../gcc/value-query.cc:85
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/tuhaoxin/compilers/gcc/build/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/tuhaoxin/compilers/gcc/build/
--enable-bootstrap --enable-checking=release --enable-languages=c,c++
-disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201007 (experimental) (GCC)

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

* [Bug c/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os
  2020-11-29 13:00 [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os haoxintu at gmail dot com
@ 2020-11-29 13:17 ` haoxintu at gmail dot com
  2020-11-29 16:56 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: haoxintu at gmail dot com @ 2020-11-29 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Haoxin Tu <haoxintu at gmail dot com> ---
*** Bug 98050 has been marked as a duplicate of this bug. ***

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

* [Bug c/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os
  2020-11-29 13:00 [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os haoxintu at gmail dot com
  2020-11-29 13:17 ` [Bug c/98051] " haoxintu at gmail dot com
@ 2020-11-29 16:56 ` hjl.tools at gmail dot com
  2020-11-30  1:07 ` [Bug tree-optimization/98051] " haoxintu at gmail dot com
  2020-11-30  3:11 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-11-29 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-29
     Ever confirmed|0                           |1
                 CC|                            |hjl.tools at gmail dot com
             Status|UNCONFIRMED                 |WAITING

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Haoxin Tu from comment #0)
> Hi all. The small.cc makes GCC-trunk crash under O2~Os, while O0-O1 is fine.
> 
> gcc version 11.0.0 20201007 (experimental) (GCC)

I can't produce with 

gcc version 11.0.0 20201128 (experimental) [master revision
b1adbc27c4a:406d9d6a006:8e59ff5541889817a160afda130bcbcdb70c4b90] (GCC) 

Please try the current master branch.

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

* [Bug tree-optimization/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os
  2020-11-29 13:00 [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os haoxintu at gmail dot com
  2020-11-29 13:17 ` [Bug c/98051] " haoxintu at gmail dot com
  2020-11-29 16:56 ` hjl.tools at gmail dot com
@ 2020-11-30  1:07 ` haoxintu at gmail dot com
  2020-11-30  3:11 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: haoxintu at gmail dot com @ 2020-11-30  1:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to H.J. Lu from comment #2)

> Please try the current master branch.

Ok, I can't reproduce it in the current trunk, either. Will check more next
time before I submit a report.

BTW, could you please close this as fixed? Thanks.

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

* [Bug tree-optimization/98051] ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os
  2020-11-29 13:00 [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os haoxintu at gmail dot com
                   ` (2 preceding siblings ...)
  2020-11-30  1:07 ` [Bug tree-optimization/98051] " haoxintu at gmail dot com
@ 2020-11-30  3:11 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-11-30  3:11 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|WAITING                     |RESOLVED

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Dup.

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

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

end of thread, other threads:[~2020-11-30  3:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29 13:00 [Bug c/98051] New: ICE in logical_combine, at gimple-range-gori.cc:754 in O2-Os haoxintu at gmail dot com
2020-11-29 13:17 ` [Bug c/98051] " haoxintu at gmail dot com
2020-11-29 16:56 ` hjl.tools at gmail dot com
2020-11-30  1:07 ` [Bug tree-optimization/98051] " haoxintu at gmail dot com
2020-11-30  3:11 ` hjl.tools at gmail dot com

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).