public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106967] New: [13 Regression] ICE in upper_bound, at value-range.h:348
@ 2022-09-19 12:10 asolokha at gmx dot com
  2022-09-19 16:16 ` [Bug tree-optimization/106967] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: asolokha at gmx dot com @ 2022-09-19 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106967
           Summary: [13 Regression] ICE in upper_bound, at
                    value-range.h:348
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc 13.0.0 20220918 snapshot (g:313879d8768d08dea035efd7fd62b753dc91c364) ICEs
when compiling the following testcase, reduced from
gcc/testsuite/gcc.dg/pr29921-2.c, w/ -O2 -ffinite-math-only -fno-trapping-math
-fno-tree-dominator-opts:

void
foo (float x, int *y)
{
  int i;
  float sum2 = 0.0;

  for (i = 0; i < *y; ++i)
    sum2 += x;

  sum2 = 1.0 / sum2;
  if (sum2 * 0.0 < 5.E-5)
    *y = 0;
}

% gcc-13.0.0 -O2 -ffinite-math-only -fno-trapping-math -fno-tree-dominator-opts
-c skavkcop.c
during GIMPLE pass: thread
skavkcop.c: In function 'foo':
skavkcop.c:2:1: internal compiler error: in upper_bound, at value-range.h:348
    2 | foo (float x, int *y)
      | ^~~
0x86077a frange::upper_bound() const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/value-range.h:348
0x86089c frange::upper_bound() const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree.h:3643
0x86089c foperator_lt::fold_range(irange&, tree_node*, frange const&, frange
const&, relation_kind_t) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/range-op-float.cc:550
0x86089c foperator_lt::fold_range(irange&, tree_node*, frange const&, frange
const&, relation_kind_t) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/range-op-float.cc:541
0x1d407b7 fold_using_range::range_of_range_op(vrange&, gimple*, fur_source&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/gimple-range-fold.cc:634
0x1d438d0 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/gimple-range-fold.cc:555
0x1d43c9c fold_range(vrange&, gimple*, range_query*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/gimple-range-fold.cc:316
0x10a647d path_range_query::range_of_stmt(vrange&, gimple*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/gimple-range-path.cc:725
0x1130994 back_threader::find_taken_edge_cond(vec<basic_block_def*, va_heap,
vl_ptr> const&, gcond*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:334
0x1130b82 back_threader::maybe_register_path(back_threader_profitability&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:248
0x1131098 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*,
unsigned int, back_threader_profitability&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:380
0x1131614 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*,
unsigned int, back_threader_profitability&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:502
0x11320af back_threader::maybe_thread_block(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:574
0x1132161 back_threader::thread_blocks()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:1002
0x11321d3 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220918/work/gcc-13-20220918/gcc/tree-ssa-threadbackward.cc:1104

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

end of thread, other threads:[~2022-09-21 11:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 12:10 [Bug tree-optimization/106967] New: [13 Regression] ICE in upper_bound, at value-range.h:348 asolokha at gmx dot com
2022-09-19 16:16 ` [Bug tree-optimization/106967] " pinskia at gcc dot gnu.org
2022-09-20  2:28 ` asolokha at gmx dot com
2022-09-20  8:39 ` [Bug tree-optimization/106967] [13 Regression] ICE in upper_bound, at value-range.h:348 since r13-2713-g917461478d3bb733 marxin at gcc dot gnu.org
2022-09-20  9:16 ` aldyh at gcc dot gnu.org
2022-09-20  9:24 ` jakub at gcc dot gnu.org
2022-09-20  9:46 ` aldyh at gcc dot gnu.org
2022-09-20  9:50 ` aldyh at gcc dot gnu.org
2022-09-20 10:18 ` jakub at gcc dot gnu.org
2022-09-20 14:33 ` aldyh at gcc dot gnu.org
2022-09-20 14:34 ` aldyh at gcc dot gnu.org
2022-09-20 14:38 ` aldyh at gcc dot gnu.org
2022-09-21  7:10 ` rguenth at gcc dot gnu.org
2022-09-21  7:41 ` aldyh at gcc dot gnu.org
2022-09-21  7:44 ` rguenther at suse dot de
2022-09-21  9:08 ` cvs-commit at gcc dot gnu.org
2022-09-21  9:10 ` aldyh at gcc dot gnu.org
2022-09-21 11:33 ` cvs-commit 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).