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

            Bug ID: 106781
           Summary: [13 Regression] ICE: verify_flow_info failed (error:
                    returns_twice call is not first in basic block 2)
           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 20220828 snapshot (g:1ae1325f24cea1698b56e4299d95446a1f7b90a2) ICEs
when compiling the following testcase w/ -O2:

int n;

__attribute__ ((noinline, returns_twice)) static int
bar (int)
{
  n /= 0;

  return n;
}

int
foo (int x)
{
  return bar (x);
}

% gcc-13.0.0 -O2 -w -c dmkrwty8.c
dmkrwty8.c: In function 'foo':
dmkrwty8.c:12:1: error: returns_twice call is not first in basic block 2
   12 | foo (int x)
      | ^~~
bar.constprop ();
during IPA pass: inline
dmkrwty8.c:12:1: internal compiler error: verify_flow_info failed
0x9fcb0d verify_flow_info()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cfghooks.cc:284
0xf44614 checking_verify_flow_info
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cfghooks.h:214
0xf44614 cleanup_tree_cfg_noloop
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/tree-cfgcleanup.cc:1156
0xf44614 cleanup_tree_cfg(unsigned int)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/tree-cfgcleanup.cc:1207
0xdfdaf4 execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/passes.cc:2057
0xdfdf4c execute_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/passes.cc:2145
0xe00970 execute_one_ipa_transform_pass
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/passes.cc:2339
0xe00970 execute_all_ipa_transforms(bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/passes.cc:2399
0xa34d2d cgraph_node::expand()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:1827
0xa34d2d cgraph_node::expand()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:1787
0xa36304 expand_all_functions
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:1998
0xa36304 symbol_table::compile()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:2348
0xa38e27 symbol_table::compile()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:2261
0xa38e27 symbol_table::finalize_compilation_unit()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220828/work/gcc-13-20220828/gcc/cgraphunit.cc:2529

Reply via email to