public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/108668] New: [13 Regression] ICE in decompose, at wide-int.h:984
@ 2023-02-03 22:46 vsevolod.livinskiy at gmail dot com
  2023-02-03 22:56 ` [Bug tree-optimization/108668] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vsevolod.livinskiy at gmail dot com @ 2023-02-03 22:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108668
           Summary: [13 Regression] ICE in decompose, at wide-int.h:984
           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/oY1x13Kc8
There is an open (Bug 102760) and recently closed (Bug 108547) issues with the
same assert message, but differences in reproducers, versions, and stack trace
make me suspicious that this might be a different bug.

Reproducer:

bool a;
const unsigned long long &foo(const unsigned long long &p1,
                            const unsigned long long &c) {
  return c > p1 ? p1 : c;
}
char e;
unsigned long long *f;
long g;
void h() {
  for (int d = 0; d < e; d = foo(8, f[0]) << foo(5, f[0]))
    a = foo(1, foo(g, 7));
}

Error:
>$ g++ -O3 -c func.cpp
during GIMPLE pass: dom
func.cpp: In function 'void h()':
func.cpp:9:6: internal compiler error: in decompose, at wide-int.h:984
    9 | void h() {
      |      ^
0x8f652a wi::int_traits<generic_wide_int<wide_int_ref_storage<false, false> >
>::decompose(long*, unsigned int, generic_wide_int<wide_int_ref_storage<false,
false> > const&)
        /testing/gcc/gcc_src_master/gcc/wide-int.h:984
0x8f72d6 wi::int_traits<generic_wide_int<wide_int_storage> >::decompose(long*,
unsigned int, generic_wide_int<wide_int_storage> const&)
        /testing/gcc/gcc_src_master/gcc/value-range.h:940
0x8f72d6 wide_int_ref_storage<true,
false>::wide_int_ref_storage<generic_wide_int<wide_int_storage>
>(generic_wide_int<wide_int_storage> const&, unsigned int)
        /testing/gcc/gcc_src_master/gcc/wide-int.h:1034
0x8f72d6 generic_wide_int<wide_int_ref_storage<true, false>
>::generic_wide_int<generic_wide_int<wide_int_storage>
>(generic_wide_int<wide_int_storage> const&, unsigned int)
        /testing/gcc/gcc_src_master/gcc/wide-int.h:790
0x8f72d6 bool wi::eq_p<generic_wide_int<wide_int_storage>,
generic_wide_int<wide_int_storage> >(generic_wide_int<wide_int_storage> const&,
generic_wide_int<wide_int_storage> const&)
        /testing/gcc/gcc_src_master/gcc/wide-int.h:1873
0x8f72d6 wi::binary_traits<generic_wide_int<wide_int_storage>,
generic_wide_int<wide_int_storage>,
wi::int_traits<generic_wide_int<wide_int_storage> >::precision_type,
wi::int_traits<generic_wide_int<wide_int_storage>
>::precision_type>::predicate_result
operator==<generic_wide_int<wide_int_storage>,
generic_wide_int<wide_int_storage> >(generic_wide_int<wide_int_storage> const&,
generic_wide_int<wide_int_storage> const&)
        /testing/gcc/gcc_src_master/gcc/wide-int.h:3307
0x8f72d6 irange::operator==(irange const&) const
        /testing/gcc/gcc_src_master/gcc/value-range.cc:1297
0x8f72d6 irange::operator==(irange const&) const
        /testing/gcc/gcc_src_master/gcc/value-range.cc:1266
0x21de1d6 range_operator::fold_range(irange&, tree_node*, irange const&, irange
const&, relation_trio) const
        /testing/gcc/gcc_src_master/gcc/range-op.cc:271
0x21de8cc operator_lshift::fold_range(irange&, tree_node*, irange const&,
irange const&, relation_trio) const
        /testing/gcc/gcc_src_master/gcc/range-op.cc:2246
0x20c90c0 fold_using_range::range_of_range_op(vrange&,
gimple_range_op_handler&, fur_source&)
        /testing/gcc/gcc_src_master/gcc/gimple-range-fold.cc:589
0x20caaaa fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range-fold.cc:489
0x20bbefc gimple_ranger::fold_range_internal(vrange&, gimple*, tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:257
0x20bbefc gimple_ranger::range_of_stmt(vrange&, gimple*, tree_node*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:318
0x20bdcd0 gimple_ranger::range_of_expr(vrange&, tree_node*, gimple*)
        /testing/gcc/gcc_src_master/gcc/gimple-range.cc:126
0x13914bf cprop_operand
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:1972
0x1393371 cprop_into_stmt
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:2049
0x1393371 dom_opt_dom_walker::optimize_stmt(basic_block_def*,
gimple_stmt_iterator*, bool*)
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:2277
0x1394723 dom_opt_dom_walker::before_dom_children(basic_block_def*)
        /testing/gcc/gcc_src_master/gcc/tree-ssa-dom.cc:1682
0x2087717 dom_walker::walk(basic_block_def*)
        /testing/gcc/gcc_src_master/gcc/domwalk.cc:311

gcc version 13.0.1 20230203 (093e2e1b201c0f324e0d8bfe6487aa2d470a13e7)

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

* [Bug tree-optimization/108668] [13 Regression] ICE in decompose, at wide-int.h:984
  2023-02-03 22:46 [Bug tree-optimization/108668] New: [13 Regression] ICE in decompose, at wide-int.h:984 vsevolod.livinskiy at gmail dot com
@ 2023-02-03 22:56 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-02-03 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 108639.

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

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

end of thread, other threads:[~2023-02-03 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 22:46 [Bug tree-optimization/108668] New: [13 Regression] ICE in decompose, at wide-int.h:984 vsevolod.livinskiy at gmail dot com
2023-02-03 22:56 ` [Bug tree-optimization/108668] " pinskia 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).