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

            Bug ID: 107447
           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 20221023 snapshot (g:0e37fd4dc74c1db99cdc7d71ef378e1221253c6f) ICEs
when compiling the following testcase w/ -O2:

int n;

void
bar (int, int);

__attribute__ ((noinline, returns_twice)) int
zero (void)
{
  return 0;
}

void
foo (void)
{
  (void) zero ();

  n = 0;

  for (;;)
    bar (zero (), n);
}

% gcc-13 -O2 -c ozyot3yy.c
ozyot3yy.c: In function 'foo':
ozyot3yy.c:13:1: error: returns_twice call is not first in basic block 2
   13 | foo (void)
      | ^~~
_7 = zero ();
during GIMPLE pass: lim
ozyot3yy.c:13:1: internal compiler error: verify_flow_info failed
0xa0dd1d verify_flow_info()
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/cfghooks.cc:284
0xe08403 execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/passes.cc:2103
0xe0891e execute_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20221023/work/gcc-13-20221023/gcc/passes.cc:2145

Reply via email to