public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)
@ 2021-10-02  5:16 haoxintu at gmail dot com
  2021-10-02  5:33 ` [Bug tree-optimization/102561] " haoxintu at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: haoxintu at gmail dot com @ 2021-10-02  5:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102561
           Summary: [12 Regression] ICE Segmentation fault during GIMPLE
                    pass: evrp (on -O2 and above)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi all.

It appears to be a quite recent regression issue.


$cat small.c
int a, b, c;
d() { (a = 2) ^ c << a || (c ^= b); }


$gcc -w -O2 small.c
during GIMPLE pass: evrp
small.c: In function ‘d’:
small.c:2:1: internal compiler error: Segmentation fault
    2 | d() { (a = 2) ^ c << a || (c ^= b); }
      | ^
0xc162af crash_signal
        ../../gcc/toplev.c:331
0x9d6a9f irange::tree_upper_bound(unsigned int) const
        ../../gcc/value-range.h:240
0x9d6a9f irange::upper_bound(unsigned int) const
        ../../gcc/value-range.h:522
0x9d6a9f irange::upper_bound(unsigned int) const
        ../../gcc/value-range.h:516
0x9d6a9f irange::upper_bound() const
        ../../gcc/value-range.h:532
0x180c493 operator_lshift::op1_range(irange&, tree_node*, irange const&, irange
const&, tree_code) const
        ../../gcc/range-op.cc:2131
0x171da1b gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:1011
0x171da95 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:689
0x171da95 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:1064
0x171e932 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:689
0x171e932 gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*,
range_query&)
        ../../gcc/gimple-range-gori.cc:1245
0x17133a3 ranger_cache::range_on_edge(irange&, edge_def*, tree_node*)
        ../../gcc/gimple-range-cache.cc:979
0x1713a78 ranger_cache::range_on_edge(irange&, edge_def*, tree_node*)
        ../../gcc/gimple-range-fold.h:97
0x1713a78 ranger_cache::propagate_cache(tree_node*)
        ../../gcc/gimple-range-cache.cc:1078
0x1714241 ranger_cache::fill_block_cache(tree_node*, basic_block_def*,
basic_block_def*)
        ../../gcc/gimple-range-cache.cc:1290
0x1714405 ranger_cache::block_range(irange&, basic_block_def*, tree_node*,
bool)
        ../../gcc/gimple-range-cache.cc:1022
0x17107a4 gimple_ranger::range_on_entry(irange&, basic_block_def*, tree_node*)
        ../../gcc/gimple-range.cc:131
0x1710df7 gimple_ranger::range_of_expr(irange&, tree_node*, gimple*)
        ../../gcc/gimple-range.cc:105
0x1718ba4 fold_using_range::range_of_range_op(irange&, gimple*, fur_source&)
        ../../gcc/gimple-range-fold.cc:604
0x171ad96 fold_using_range::fold_stmt(irange&, gimple*, fur_source&,
tree_node*)
        ../../gcc/gimple-range-fold.cc:556
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 -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/haoxin/haoxin-data/compilers/gcc/build/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure
--prefix=/home/haoxin/haoxin-data/compilers/gcc/build/ --enable-bootstrap
--enable-checking=release --enable-languages=c,c++ --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211002 (experimental) (GCC)

Thanks,
Haoxin

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

* [Bug tree-optimization/102561] [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)
  2021-10-02  5:16 [Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above) haoxintu at gmail dot com
@ 2021-10-02  5:33 ` haoxintu at gmail dot com
  2021-10-02  5:34 ` pinskia at gcc dot gnu.org
  2021-10-02 15:02 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: haoxintu at gmail dot com @ 2021-10-02  5:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Haoxin Tu <haoxintu at gmail dot com> ---
Similar case:

#include <stdint.h>
int a;
void b(int c) {
  uint16_t d;
  uint16_t *e;
  int16_t f;
  int64_t g;
  if ((g || (d = 0)) == c << (0 <= (*e ^= c)))
    *e - f && (a = d);
}

Error:
during GIMPLE pass: vrp-thread
small.c: In function ‘b’:
small.c:3:6: internal compiler error: Segmentation fault
    3 | void b(int c) {
      |      ^
0xc162af crash_signal
        ../../gcc/toplev.c:331
0x9d6a9f irange::tree_upper_bound(unsigned int) const
        ../../gcc/value-range.h:240
0x9d6a9f irange::upper_bound(unsigned int) const
        ../../gcc/value-range.h:522
0x9d6a9f irange::upper_bound(unsigned int) const
        ../../gcc/value-range.h:516
0x9d6a9f irange::upper_bound() const
        ../../gcc/value-range.h:532
0x180c493 operator_lshift::op1_range(irange&, tree_node*, irange const&, irange
const&, tree_code) const
        ../../gcc/range-op.cc:2131
0x171da1b gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:1011
0x171da95 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:689
0x171da95 gori_compute::compute_operand1_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:1064
0x171e932 gori_compute::compute_operand_range(irange&, gimple*, irange const&,
tree_node*, fur_source&)
        ../../gcc/gimple-range-gori.cc:689
0x171e932 gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*,
range_query&)
        ../../gcc/gimple-range-gori.cc:1245
0x1843587 path_range_query::compute_ranges_in_block(basic_block_def*)
        ../../gcc/gimple-range-path.cc:349
0x184451a path_range_query::compute_ranges(vec<basic_block_def*, va_heap,
vl_ptr> const&, bitmap_head const*)
        ../../gcc/gimple-range-path.cc:516
0xde0a22 hybrid_jt_simplifier::compute_ranges_from_state(gimple*, jt_state*)
        ../../gcc/tree-ssa-threadedge.c:1466
0xde0a70 hybrid_jt_simplifier::simplify(gimple*, gimple*, basic_block_def*,
jt_state*)
        ../../gcc/tree-ssa-threadedge.c:1421
0xddfa13 jump_threader::simplify_control_stmt_condition(edge_def*, gimple*)
        ../../gcc/tree-ssa-threadedge.c:386
0xddffea jump_threader::thread_through_normal_block(vec<jump_thread_edge*,
va_heap, vl_ptr>*, edge_def*, bitmap_head*)
        ../../gcc/tree-ssa-threadedge.c:952
0xde1500 jump_threader::thread_through_normal_block(vec<jump_thread_edge*,
va_heap, vl_ptr>*, edge_def*, bitmap_head*)
        ../../gcc/tree-ssa-threadedge.c:911
0xde1500 jump_threader::thread_across_edge(edge_def*)
        ../../gcc/tree-ssa-threadedge.c:1155
0x16e647a dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:352
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.

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

* [Bug tree-optimization/102561] [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)
  2021-10-02  5:16 [Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above) haoxintu at gmail dot com
  2021-10-02  5:33 ` [Bug tree-optimization/102561] " haoxintu at gmail dot com
@ 2021-10-02  5:34 ` pinskia at gcc dot gnu.org
  2021-10-02 15:02 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-02  5:34 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

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

* [Bug tree-optimization/102561] [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above)
  2021-10-02  5:16 [Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above) haoxintu at gmail dot com
  2021-10-02  5:33 ` [Bug tree-optimization/102561] " haoxintu at gmail dot com
  2021-10-02  5:34 ` pinskia at gcc dot gnu.org
@ 2021-10-02 15:02 ` aldyh at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: aldyh at gcc dot gnu.org @ 2021-10-02 15:02 UTC (permalink / raw)
  To: gcc-bugs

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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

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

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
duplicate

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

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

end of thread, other threads:[~2021-10-02 15:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-02  5:16 [Bug tree-optimization/102561] New: [12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (on -O2 and above) haoxintu at gmail dot com
2021-10-02  5:33 ` [Bug tree-optimization/102561] " haoxintu at gmail dot com
2021-10-02  5:34 ` pinskia at gcc dot gnu.org
2021-10-02 15:02 ` aldyh 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).