[Bug tree-optimization/106497] New: [13 Regression] ICE in duplicate_block, at cfghooks.cc:1115

asolokha at gmx dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 1 10:19:04 GMT 2022


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

            Bug ID: 106497
           Summary: [13 Regression] ICE in duplicate_block, at
                    cfghooks.cc:1115
           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: asolokha at gmx dot com
  Target Milestone: ---

gcc 13.0.0 20220731 snapshot (g:525a1a73a5a563c829a5f76858fe122c9b39f254) ICEs
when compiling the following testcase w/ -O1 -fno-tree-dce:

int n;

__attribute__ ((pure,returns_twice)) int
bar (void);

int
foo (int x)
{
  n = 0;

  bar ();

  if (x && n)
    return 0;

  foo (x);
}

% gcc-13.0.0 -O1 -fno-tree-dce -c umkc68rf.c
during GIMPLE pass: dom
umkc68rf.c: In function 'foo':
umkc68rf.c:7:1: internal compiler error: in duplicate_block, at
cfghooks.cc:1115
    7 | foo (int x)
      | ^~~
0x69bd32 duplicate_block(basic_block_def*, edge_def*, basic_block_def*,
copy_bb_data*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/cfghooks.cc:1115
0x112f3d6 create_block_for_threading
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:428
0x1132be5 ssa_create_duplicates(redirection_data**, ssa_local_info_t*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:1212
0x113496b void hash_table<redirection_data, false,
xcallocator>::traverse_noresize<ssa_local_info_t*,
&(ssa_create_duplicates(redirection_data**,
ssa_local_info_t*))>(ssa_local_info_t*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/hash-table.h:1084
0x113496b void hash_table<redirection_data, false,
xcallocator>::traverse<ssa_local_info_t*,
&(ssa_create_duplicates(redirection_data**,
ssa_local_info_t*))>(ssa_local_info_t*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/hash-table.h:1105
0x113496b fwd_jt_path_registry::thread_block_1(basic_block_def*, bool, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:1580
0x1136b6f fwd_jt_path_registry::thread_block(basic_block_def*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:1627
0x1136b6f fwd_jt_path_registry::update_cfg(bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:2724
0x1133dea jt_path_registry::thread_through_all_blocks(bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-threadupdate.cc:2595
0x1025609 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220731/work/gcc-13-20220731/gcc/tree-ssa-dom.cc:866


More information about the Gcc-bugs mailing list