public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/112843] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in ranger_cache::range_of_expr (gimple-range-cache.cc:1204) with _BitInt() at -O1
@ 2023-12-04 11:45 zsojka at seznam dot cz
  2023-12-04 14:17 ` [Bug tree-optimization/112843] " jakub at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: zsojka at seznam dot cz @ 2023-12-04 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112843
           Summary: during GIMPLE pass: bitintlower ICE: SIGSEGV in
                    ranger_cache::range_of_expr
                    (gimple-range-cache.cc:1204) with _BitInt() at -O1
           Product: gcc
           Version: 14.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
            Target: x86_64-pc-linux-gnu

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

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O testcase.c -wrapper valgrind,-q
==18057== Invalid read of size 8
==18057==    at 0x25641C8: ranger_cache::range_of_expr(vrange&, tree_node*,
gimple*) (gimple-range-cache.cc:1204)
==18057==    by 0x256FDB9: fold_using_range::range_of_range_op(vrange&,
gimple_range_op_handler&, fur_source&) (gimple-range-fold.cc:671)
==18057==    by 0x25719D2: fold_using_range::fold_stmt(vrange&, gimple*,
fur_source&, tree_node*) (gimple-range-fold.cc:602)
==18057==    by 0x25575CD: gimple_ranger::update_stmt(gimple*)
(gimple-range.cc:564)
==18057==    by 0x16A90C4: update_stmt_operands(function*, gimple*)
(tree-ssa-operands.cc:1150)
==18057==    by 0x113AE26: update_stmt_if_modified (gimple-ssa.h:187)
==18057==    by 0x113AE26: update_stmt_if_modified (gimple-ssa.h:184)
==18057==    by 0x113AE26: update_modified_stmt (gimple-iterator.cc:44)
==18057==    by 0x113AE26: gsi_insert_after(gimple_stmt_iterator*, gimple*,
gsi_iterator_update) (gimple-iterator.cc:544)
==18057==    by 0x254E274: gimple_lower_bitint() (gimple-lower-bitint.cc:6348)
==18057==    by 0x13A3C1A: execute_one_pass(opt_pass*) (passes.cc:2641)
==18057==    by 0x13A44FF: execute_pass_list_1(opt_pass*) (passes.cc:2750)
==18057==    by 0x13A4511: execute_pass_list_1(opt_pass*) (passes.cc:2751)
==18057==    by 0x13A4538: execute_pass_list(function*, opt_pass*)
(passes.cc:2761)
==18057==    by 0xFB1595: expand (cgraphunit.cc:1841)
==18057==    by 0xFB1595: cgraph_node::expand() (cgraphunit.cc:1794)
==18057==  Address 0x10 is not stack'd, malloc'd or (recently) free'd
==18057== 
during GIMPLE pass: bitintlower
testcase.c: In function 'foo':
testcase.c:2:1: internal compiler error: Segmentation fault
    2 | foo (_BitInt (128) x, _BitInt (256) y)
      | ^~~
0x14e51ff crash_signal
        /repo/gcc-trunk/gcc/toplev.cc:316
0x25641c8 ranger_cache::range_of_expr(vrange&, tree_node*, gimple*)
        /repo/gcc-trunk/gcc/gimple-range-cache.cc:1204
0x256fdb9 fold_using_range::range_of_range_op(vrange&,
gimple_range_op_handler&, fur_source&)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:671
0x25719d2 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        /repo/gcc-trunk/gcc/gimple-range-fold.cc:602
0x25575cd gimple_ranger::update_stmt(gimple*)
        /repo/gcc-trunk/gcc/gimple-range.cc:564
0x16a90c4 update_stmt_operands(function*, gimple*)
        /repo/gcc-trunk/gcc/tree-ssa-operands.cc:1150
0x113ae26 update_stmt_if_modified(gimple*)
        /repo/gcc-trunk/gcc/gimple-ssa.h:187
0x113ae26 update_stmt_if_modified(gimple*)
        /repo/gcc-trunk/gcc/gimple-ssa.h:184
0x113ae26 update_modified_stmt
        /repo/gcc-trunk/gcc/gimple-iterator.cc:44
0x113ae26 gsi_insert_after(gimple_stmt_iterator*, gimple*, gsi_iterator_update)
        /repo/gcc-trunk/gcc/gimple-iterator.cc:544
0x254e274 gimple_lower_bitint
        /repo/gcc-trunk/gcc/gimple-lower-bitint.cc:6348
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-r14-6110-20231204161110-g462ccc3b9d5-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.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-r14-6110-20231204161110-g462ccc3b9d5-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231204 (experimental) (GCC)

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

end of thread, other threads:[~2023-12-06  7:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 11:45 [Bug tree-optimization/112843] New: during GIMPLE pass: bitintlower ICE: SIGSEGV in ranger_cache::range_of_expr (gimple-range-cache.cc:1204) with _BitInt() at -O1 zsojka at seznam dot cz
2023-12-04 14:17 ` [Bug tree-optimization/112843] " jakub at gcc dot gnu.org
2023-12-04 14:26 ` rguenth at gcc dot gnu.org
2023-12-04 14:28 ` rguenth at gcc dot gnu.org
2023-12-04 14:32 ` rguenth at gcc dot gnu.org
2023-12-04 16:02 ` amacleod at redhat dot com
2023-12-04 16:13 ` jakub at gcc dot gnu.org
2023-12-04 16:39 ` amacleod at redhat dot com
2023-12-04 16:57 ` jakub at gcc dot gnu.org
2023-12-04 18:19 ` amacleod at redhat dot com
2023-12-05  8:48 ` cvs-commit at gcc dot gnu.org
2023-12-06  7:28 ` cvs-commit at gcc dot gnu.org
2023-12-06  7:57 ` rguenth 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).