public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow
@ 2022-10-22  5:24 zsojka at seznam dot cz
  2022-10-24  7:14 ` [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2022-10-22  5:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107355
           Summary: [13 Regression] ICE: in lower_bound, at
                    value-range.h:350 with -fsanitize=float-cast-overflow
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Created attachment 53754
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53754&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O2 -fno-guess-branch-probability
-fsanitize=float-cast-overflow --param=max-jump-thread-duplication-stmts=240
testcase.c 
during GIMPLE pass: thread
testcase.c: In function 'foo':
testcase.c:4:1: internal compiler error: in lower_bound, at value-range.h:350
    4 | foo (double d)
      | ^~~
0xd14158 frange::lower_bound() const
        /repo/gcc-trunk/gcc/value-range.h:350
0xd14224 frange::lower_bound() const
        /repo/gcc-trunk/gcc/range-op-float.cc:283
0xd14224 foperator_abs::op1_range(frange&, tree_node*, frange const&, frange
const&, relation_trio) const
        /repo/gcc-trunk/gcc/range-op-float.cc:1276
0x2545fe8 foperator_abs::op1_range(frange&, tree_node*, frange const&, frange
const&, relation_trio) const
        /repo/gcc-trunk/gcc/range-op-float.cc:1261
0x2425897 gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1095
0x2424553 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2425913 gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1150
0x2424553 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2424251 gori_compute::compute_logical_operands(vrange&, vrange&,
gimple_range_op_handler&, irange const&, tree_node*, fur_source&, tree_node*,
bool)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:935
0x2424b5e gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:677
0x2425913 gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1150
0x2424553 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x24282a2 gori_compute::outgoing_edge_range_p(vrange&, edge_def*, tree_node*,
range_query&)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1373
0x1581235 path_range_query::compute_ranges_in_block(basic_block_def*)
        /repo/gcc-trunk/gcc/gimple-range-path.cc:454
0x15818e2 path_range_query::compute_ranges(bitmap_head const*)
        /repo/gcc-trunk/gcc/gimple-range-path.cc:622
0x16074a9 back_threader::find_taken_edge_cond(vec<basic_block_def*, va_heap,
vl_ptr> const&, gcond*)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:333
0x1607662 back_threader::maybe_register_path(back_threader_profitability&)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:248
0x1607b18 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*,
unsigned int, back_threader_profitability&)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:380
0x1607f6d back_threader::find_paths_to_names(basic_block_def*, bitmap_head*,
unsigned int, back_threader_profitability&)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:488
0x1607f6d back_threader::find_paths_to_names(basic_block_def*, bitmap_head*,
unsigned int, back_threader_profitability&)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:488
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r13-3440-20221021201743-g4cfdaeb2755-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r13-3440-20221021201743-g4cfdaeb2755-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20221021 (experimental) (GCC)

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
@ 2022-10-24  7:14 ` marxin at gcc dot gnu.org
  2022-10-24 10:38 ` aldyh at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-10-24  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-10-24
     Ever confirmed|0                           |1
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
   Target Milestone|---                         |13.0
            Summary|[13 Regression] ICE: in     |[13 Regression] ICE: in
                   |lower_bound, at             |lower_bound, at
                   |value-range.h:350 with      |value-range.h:350 with
                   |-fsanitize=float-cast-overf |-fsanitize=float-cast-overf
                   |low                         |low since
                   |                            |r13-3231-g706d8583706475fb
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r13-3231-g706d8583706475fb.

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
  2022-10-24  7:14 ` [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb marxin at gcc dot gnu.org
@ 2022-10-24 10:38 ` aldyh at gcc dot gnu.org
  2022-10-24 13:00 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-10-24 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 53768
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53768&action=edit
untested

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
  2022-10-24  7:14 ` [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb marxin at gcc dot gnu.org
  2022-10-24 10:38 ` aldyh at gcc dot gnu.org
@ 2022-10-24 13:00 ` rguenth at gcc dot gnu.org
  2022-10-24 13:33 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-10-24 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-10-24 13:00 ` rguenth at gcc dot gnu.org
@ 2022-10-24 13:33 ` cvs-commit at gcc dot gnu.org
  2022-10-24 13:35 ` aldyh at gcc dot gnu.org
  2022-10-24 13:35 ` aldyh at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-24 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Aldy Hernandez <aldyh@gcc.gnu.org>:

https://gcc.gnu.org/g:5bcd92d0d4029f3d1d2eacc0e2bff1685545b74f

commit r13-3456-g5bcd92d0d4029f3d1d2eacc0e2bff1685545b74f
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Mon Oct 24 12:37:25 2022 +0200

    [PR tree-optimization/107355] Handle NANs in abs range-op entry.

    The problem here is that the threader is coming up with a path where
    the only valid result is a NAN.  When the abs op1_range entry is
    trying to add the negative posibility, it attempts to get the bounds
    of the working range.  NANs don't have bounds so they need to be
    special cased.

            PR tree-optimization/107355

    gcc/ChangeLog:

            * range-op-float.cc (foperator_abs::op1_range): Handle NAN.

    gcc/testsuite/ChangeLog:

            * gcc.dg/tree-ssa/pr107355.c: New test.

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2022-10-24 13:33 ` cvs-commit at gcc dot gnu.org
@ 2022-10-24 13:35 ` aldyh at gcc dot gnu.org
  2022-10-24 13:35 ` aldyh at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-10-24 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
fixed

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

* [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb
  2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2022-10-24 13:35 ` aldyh at gcc dot gnu.org
@ 2022-10-24 13:35 ` aldyh at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: aldyh at gcc dot gnu.org @ 2022-10-24 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
...and closed :-).

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

end of thread, other threads:[~2022-10-24 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-22  5:24 [Bug middle-end/107355] New: [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow zsojka at seznam dot cz
2022-10-24  7:14 ` [Bug middle-end/107355] [13 Regression] ICE: in lower_bound, at value-range.h:350 with -fsanitize=float-cast-overflow since r13-3231-g706d8583706475fb marxin at gcc dot gnu.org
2022-10-24 10:38 ` aldyh at gcc dot gnu.org
2022-10-24 13:00 ` rguenth at gcc dot gnu.org
2022-10-24 13:33 ` cvs-commit at gcc dot gnu.org
2022-10-24 13:35 ` aldyh at gcc dot gnu.org
2022-10-24 13:35 ` 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).