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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As A.3 is in the body of a construct that is outlined into a separate function,
it should be moved to the *omp_fn* function with it.
If you look at simple
int
main ()
{
  #pragma omp parallel
  {
    int a = 25;
    ++a;
  }
}
you can see in the gimple dump two pairs of {}s instead of just once:
    #pragma omp parallel
      {
        {
          int a;

          a = 25;
          a = a + 1;
        }
      }
(ditto target, task, (host) teams etc.), while with acc parallel that isn't the
case:
  #pragma omp target oacc_parallel map(from:(*array.12_5) [len: D.4276])
map(alloc:array [pointer assign, bias: 0]) firstprivate(ubound.0)
firstprivate(nn)
    {
The reason for that for the OpenMP construct is exactly to ensure that
move_sese_region_to_fn does the right thing with it.

Reply via email to