public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107170] New: ICE on valid code: in as_a, at value-range.h:381
@ 2022-10-06 15:59 k.even-mendoza at imperial dot ac.uk
  2022-10-06 16:55 ` [Bug c/107170] " aldyh at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: k.even-mendoza at imperial dot ac.uk @ 2022-10-06 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107170
           Summary: ICE on valid code: in as_a, at value-range.h:381
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: k.even-mendoza at imperial dot ac.uk
  Target Milestone: ---

The following code crashed GCC-13 when compiling with -O2, -O3 or -Os in Ubuntu
18, x-86_64; GCC-12, from April, seems to work fine.

===
#include <stdlib.h>
int main() {
  double a;
  if (__builtin_signbit(a))
    abort();
}
===
The trace:

during GIMPLE pass: vrp
fuzzer-file-12773.c: In function 'main':
fuzzer-file-12773.c:2:5: internal compiler error: in as_a, at value-range.h:381
    2 | int main() {
      |     ^~~~
0x80bc97 irange& as_a<irange>(vrange&)
        .././../gcc-source/gcc/value-range.h:381
0x80bc97 irange& as_a<irange>(vrange&)
        .././../gcc-source/gcc/value-range.h:379
0x80bc97 vrange::operator=(vrange const&)
        .././../gcc-source/gcc/value-range.cc:202
0x80bc97 vrange::operator=(vrange const&)
        .././../gcc-source/gcc/value-range.cc:199
0x12c61f2 vr_values::range_of_expr(vrange&, tree_node*, gimple*)
        .././../gcc-source/gcc/vr-values.cc:188
0x1cf1f17 fold_using_range::range_of_range_op(vrange&,
gimple_range_op_handler&, fur_source&)
        .././../gcc-source/gcc/gimple-range-fold.cc:550
0x1cf3c10 fold_using_range::fold_stmt(vrange&, gimple*, fur_source&,
tree_node*)
        .././../gcc-source/gcc/gimple-range-fold.cc:489
0x1cf402b fold_range(vrange&, gimple*, range_query*)
        .././../gcc-source/gcc/gimple-range-fold.cc:316
0x12c9e9f vr_values::extract_range_basic(value_range_equiv*, gimple*)
        .././../gcc-source/gcc/vr-values.cc:1245
0x12269fd vrp_prop::visit_stmt(gimple*, edge_def**, tree_node**)
        .././../gcc-source/gcc/tree-vrp.cc:3865
0x111c5a6 ssa_propagation_engine::simulate_stmt(gimple*)
        .././../gcc-source/gcc/tree-ssa-propagate.cc:230
0x111c892 ssa_propagation_engine::simulate_block(basic_block_def*)
        .././../gcc-source/gcc/tree-ssa-propagate.cc:337
0x111ccc3 ssa_propagation_engine::ssa_propagate()
        .././../gcc-source/gcc/tree-ssa-propagate.cc:504
0x12331f5 execute_vrp
        .././../gcc-source/gcc/tree-vrp.cc:4215

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

end of thread, other threads:[~2022-10-06 20:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-06 15:59 [Bug c/107170] New: ICE on valid code: in as_a, at value-range.h:381 k.even-mendoza at imperial dot ac.uk
2022-10-06 16:55 ` [Bug c/107170] " aldyh at gcc dot gnu.org
2022-10-06 17:31 ` aldyh at gcc dot gnu.org
2022-10-06 17:37 ` [Bug tree-optimization/107170] [13 Regression] " pinskia at gcc dot gnu.org
2022-10-06 18:44 ` marxin at gcc dot gnu.org
2022-10-06 20:41 ` cvs-commit at gcc dot gnu.org
2022-10-06 20:42 ` 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).