public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/107668] New: [13 Regression] ICE: in clear_nan, at value-range.h:1167 with -fsanitize=float-cast-overflow and _Complex int
@ 2022-11-13 19:36 zsojka at seznam dot cz
  2022-11-13 21:01 ` [Bug tree-optimization/107668] " dcb314 at hotmail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: zsojka at seznam dot cz @ 2022-11-13 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107668
           Summary: [13 Regression] ICE: in clear_nan, at
                    value-range.h:1167 with -fsanitize=float-cast-overflow
                    and _Complex int
           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: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Two examples:
$ cat testcase.c
_Complex short c;

void
foo (void)
{
  c *= (_Complex) 5;
}
$ x86_64-pc-linux-gnu-gcc -Ofast -fsanitize=float-cast-overflow
-fno-guess-branch-probability -fsigned-zeros testcase.c 
cc1: warning: '-fassociative-math' disabled; other options take precedence
during GIMPLE pass: thread
testcase.c: In function 'foo':
testcase.c:4:1: internal compiler error: in clear_nan, at value-range.h:1167
    4 | foo (void)
      | ^~~
0xd1af22 frange::clear_nan()
        /repo/gcc-trunk/gcc/value-range.h:1167
0xd1b0de frange::clear_nan()
        /repo/gcc-trunk/gcc/value-range.h:1127
0xd1b0de float_binary_op_range_finish
        /repo/gcc-trunk/gcc/range-op-float.cc:1904
0x2568f53 float_binary_op_range_finish
        /repo/gcc-trunk/gcc/range-op-float.cc:1886
0x2568f53 foperator_mult::op1_range(frange&, tree_node*, frange const&, frange
const&, relation_trio) const
        /repo/gcc-trunk/gcc/range-op-float.cc:2143
0x24414d7 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2441e2f gori_compute::compute_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1243
0x24408ca gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:694
0x2441553 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x243ff7b 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:917
0x2440750 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:674
0x2441553 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2443ee2 gori_compute::outgoing_edge_range_p(vrange&, edge_def*, tree_node*,
range_query&)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1373
0x159a3e5 path_range_query::compute_ranges_in_block(basic_block_def*)
        /repo/gcc-trunk/gcc/gimple-range-path.cc:454
0x159aa92 path_range_query::compute_ranges(bitmap_head const*)
        /repo/gcc-trunk/gcc/gimple-range-path.cc:622
0x16205d9 back_threader::find_taken_edge_cond(vec<basic_block_def*, va_heap,
vl_ptr> const&, gcond*)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:324
0x162078e back_threader::maybe_register_path(back_threader_profitability&)
        /repo/gcc-trunk/gcc/tree-ssa-threadbackward.cc:248
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.


$ cat testcase.c
_Complex int c;
int i;

void
foo (void)
{
  c /= (_Complex) i;
}
$ x86_64-pc-linux-gnu-gcc -Os -ffinite-math-only -fsanitize=float-cast-overflow
-fcx-fortran-rules testcase.c 
during GIMPLE pass: dom
testcase.c: In function 'foo':
testcase.c:5:1: internal compiler error: in clear_nan, at value-range.h:1167
    5 | foo (void)
      | ^~~
0xd1af22 frange::clear_nan()
        /repo/gcc-trunk/gcc/value-range.h:1167
0xd1b0de frange::clear_nan()
        /repo/gcc-trunk/gcc/value-range.h:1127
0xd1b0de float_binary_op_range_finish
        /repo/gcc-trunk/gcc/range-op-float.cc:1904
0x2568f53 float_binary_op_range_finish
        /repo/gcc-trunk/gcc/range-op-float.cc:1886
0x2568f53 foperator_mult::op1_range(frange&, tree_node*, frange const&, frange
const&, relation_trio) const
        /repo/gcc-trunk/gcc/range-op-float.cc:2143
0x24414d7 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2441e2f gori_compute::compute_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1243
0x24408ca gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:694
0x2441e2f gori_compute::compute_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1243
0x24423b2 gori_compute::compute_operand1_and_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1263
0x2440ac0 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:689
0x2441553 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x243fe91 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
0x2440750 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:674
0x2441553 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
0x2440193 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:692
0x2443ee2 gori_compute::outgoing_edge_range_p(vrange&, edge_def*, tree_node*,
range_query&)
        /repo/gcc-trunk/gcc/gimple-range-gori.cc:1373
0x2434dee ranger_cache::edge_range(vrange&, edge_def*, tree_node*,
ranger_cache::rfd_mode)
        /repo/gcc-trunk/gcc/gimple-range-cache.cc:964
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-3944-20221113164720-g43435c7eb0f-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-3944-20221113164720-g43435c7eb0f-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.0 20221113 (experimental) (GCC)

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

end of thread, other threads:[~2022-11-16  8:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 19:36 [Bug tree-optimization/107668] New: [13 Regression] ICE: in clear_nan, at value-range.h:1167 with -fsanitize=float-cast-overflow and _Complex int zsojka at seznam dot cz
2022-11-13 21:01 ` [Bug tree-optimization/107668] " dcb314 at hotmail dot com
2022-11-13 21:32 ` dcb314 at hotmail dot com
2022-11-14  8:13 ` dcb314 at hotmail dot com
2022-11-14  8:34 ` dcb314 at hotmail dot com
2022-11-14  8:50 ` dcb314 at hotmail dot com
2022-11-14  9:14 ` dcb314 at hotmail dot com
2022-11-14 14:04 ` rguenth at gcc dot gnu.org
2022-11-14 14:28 ` jakub at gcc dot gnu.org
2022-11-15  8:19 ` jakub at gcc dot gnu.org
2022-11-15  8:29 ` jakub at gcc dot gnu.org
2022-11-15 16:26 ` aldyh at gcc dot gnu.org
2022-11-16  6:36 ` cvs-commit at gcc dot gnu.org
2022-11-16  8:23 ` jakub 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).