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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Simpler testcase:
void
foo (void)
{
  void *p = &&lab;
  #pragma omp parallel
  for (;;)
    ;
  lab:;
}

The problem seems that the OpenMP parallel body is noreturn, so when building
cfg we build correctly:
<bb 2> :
p = &lab;
#pragma omp parallel [child fn: foo._omp_fn.0 (???)]

<bb 3> :
goto <bb 3>; [INV]

<bb 4> :
#pragma omp return

<bb 5> :
lab:
return;

but during cfg cleanup, we find that #pragma omp return is unreachable (that is
ok) and that also lab: return; is unreachable.  And place it somewhere
randomly, which would be ok if it wouldn't be inside of the OpenMP block body
(bb3).

Reply via email to