public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105820] New: [13 Regression] ICE in invert, at value-range.cc:1971
Date: Thu, 02 Jun 2022 11:10:34 +0000	[thread overview]
Message-ID: <bug-105820-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105820
           Summary: [13 Regression] ICE in invert, at value-range.cc:1971
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-checking, 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: ---

g++ 13.0.0 20220529 snapshot (g:58a40e76ebadce78639644cd3d56e42b68336927) ICEs
when compiling the following testcase, reduced from
gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c, w/ -O2 -fstrict-enums --param
case-values-threshold=1:

typedef int basic_block;

enum gimple_code {};

struct omp_region {
  omp_region *outer;
  basic_block cont;
};

void
oof (void);

void
build_omp_regions_1 (omp_region *parent, basic_block bb, gimple_code code)
{
  if (code == 2)
    parent = parent->outer;
  else if (code != 0)
    parent->cont = bb;

  if (parent)
    oof ();
}

% g++-13.0.0 -O2 -fstrict-enums --param case-values-threshold=1 -c bx6eiilz.c
during GIMPLE pass: threadfull
bx6eiilz.c: In function 'void build_omp_regions_1(omp_region*, basic_block,
gimple_code)':
bx6eiilz.c:14:1: internal compiler error: in invert, at value-range.cc:1971
   14 | build_omp_regions_1 (omp_region *parent, basic_block bb, gimple_code
code)
      | ^~~~~~~~~~~~~~~~~~~
0x88b323 irange::invert()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/value-range.cc:1971
0x1f574f2 gimple_outgoing_range::calc_switch_ranges(gswitch*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-edge.cc:148
0x1f57bbd gimple_outgoing_range::get_edge_range(irange&, gimple*, edge_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-edge.cc:106
0x1f57ef4 gimple_outgoing_range::edge_range_p(irange&, edge_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-edge.cc:212
0x1f61f7f gori_compute::outgoing_edge_range_p(irange&, edge_def*, tree_node*,
range_query&)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-gori.cc:1255
0x1f54dc9 ranger_cache::edge_range(irange&, edge_def*, tree_node*,
ranger_cache::rfd_mode)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-cache.cc:951
0x1f51ce4 gimple_ranger::range_on_edge(irange&, edge_def*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range.cc:240
0x1372f84 path_range_query::ssa_range_in_phi(irange&, gphi*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-path.cc:323
0x1372a35 path_range_query::range_defined_in_block(irange&, tree_node*,
basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-path.cc:350
0x137318b path_range_query::compute_ranges_in_phis(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-path.cc:393
0x13733d4 path_range_query::compute_ranges_in_block(basic_block_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-path.cc:442
0x13739a9 path_range_query::compute_ranges(vec<basic_block_def*, va_heap,
vl_ptr> const&, bitmap_head const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/gimple-range-path.cc:656
0x13f8e10 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_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:319
0x13f97ef back_threader::maybe_register_path()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:232
0x13f9fac back_threader::find_paths_to_names(basic_block_def*, bitmap_head*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:419
0x13fa137 back_threader::resolve_phi(gphi*, bitmap_head*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:396
0x13fa137 back_threader::resolve_phi(gphi*, bitmap_head*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:356
0x13f9ef4 back_threader::find_paths_to_names(basic_block_def*, bitmap_head*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:444
0x13fa30a back_threader::find_paths(basic_block_def*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:493
0x13fa541 back_threader::thread_blocks()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220529/work/gcc-13-20220529/gcc/tree-ssa-threadbackward.cc:901

             reply	other threads:[~2022-06-02 11:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 11:10 asolokha at gmx dot com [this message]
2022-06-02 12:18 ` [Bug tree-optimization/105820] " rguenth at gcc dot gnu.org
2022-06-02 13:05 ` amacleod at redhat dot com
2022-06-03  5:30 ` aldyh at gcc dot gnu.org
2022-06-16 14:00 ` amacleod at redhat dot com
2022-10-17 11:24 ` asolokha at gmx dot com
2022-10-17 12:14 ` marxin at gcc dot gnu.org
2022-10-17 12:38 ` asolokha at gmx dot com
2022-10-17 12:42 ` marxin at gcc dot gnu.org
2022-10-17 13:41 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105820-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).