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

            Bug ID: 108783
           Summary: [13 Regression] ICE: verify_flow_info failed (error:
                    returns_twice call is not first in basic block 3)
           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.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) ICEs
when compiling the following testcase w/ -O1:

int
bar (int x)
{
  return x;
}

__attribute__((returns_twice)) int
foo (int x, int y)
{
  int a;

  a = bar (x);
  (void) foo (x, y);

  return y && a && a;
}

% gcc-13 -O1 -c ibxb9fcz.c
ibxb9fcz.c: In function 'foo':
ibxb9fcz.c:8:1: error: returns_twice call is not first in basic block 3
    8 | foo (int x, int y)
      | ^~~
foo (x_9(D), y_12(D));
during GIMPLE pass: reassoc
ibxb9fcz.c:8:1: internal compiler error: verify_flow_info failed
0xa06a6d verify_flow_info()
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/cfghooks.cc:285
0xe0b153 execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/passes.cc:2103
0xe0b69e execute_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/passes.cc:2145

Reply via email to