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

            Bug ID: 81768
           Summary: error: control flow in the middle of basic block
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

This code, minimized from for-5.c:
...
extern void abort ();

int a[1500];
float b[10][15][10];

void
f14_tpf_simd_static32 (void)
{
  float *i;
#pragma omp target parallel for simd schedule(static, 32) collapse(3)

  for (i = &b[0][0][0]; i < &b[0][0][10]; i++)

    for (float *j = &b[0][15][0]; j > &b[0][0][0]; j -= 10)

      for (float *k = &b[0][0][10]; k > &b[0][0][0]; --k)

        b[i - &b[0][0][0]][(j - &b[0][0][0]) / 10 - 1][(k - &b[0][0][0]) - 1]

          -= 3.5;
}
...


Compiled like this:
...
$ ./install/bin/gcc -O2 -fopenmp for-5.c
...


Results in:
...
for-5.c: In function ‘f14_tpf_simd_static32._omp_fn.1’:
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L15> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L16> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L17> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L18> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L19> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 12
for-5.c:21:1: error: label 
<L20> in the middle of basic block 12for-5.c:21:1: error: control flow in the
middle of basic block 12
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L9> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L10> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L11> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L12> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L13> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
for-5.c:21:1: error: control flow in the middle of basic block 7
for-5.c:21:1: error: label 
<L14> in the middle of basic block 7for-5.c:21:1: error: control flow in the
middle of basic block 7
during GIMPLE pass: fixup_cfg
dump file: for-5.c.019t.fixup_cfg1
for-5.c:21:1: internal compiler error: verify_flow_info failed
0x7bef03 verify_flow_info()
        /home/vries/oacc/trunk/source-gcc/gcc/cfghooks.c:259
0xb33762 execute_function_todo
        /home/vries/oacc/trunk/source-gcc/gcc/passes.c:2002
0xb34199 execute_todo
        /home/vries/oacc/trunk/source-gcc/gcc/passes.c:2044
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
...

Using x86_64 compiler with nvptx offloading enabled.

r250889.

Reply via email to