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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For the expand_omp_target hunk, a testcase would be e.g.

int
main ()
{
  int n = 0;
#pragma omp target map(tofrom:n)
#pragma omp for reduction (+: n)
  for (int i = [](){ return 3; }(); i < 10; ++i)
    n++;
  if (n != 7)
    __builtin_abort ();
}

For tasking as opposed to parallel, testcase that ICEs is e.g.:

int
main ()
{
  int n = 0;
#pragma omp task shared (n)
  for (int i = [](){ return 3; }(); i < 10; ++i)
    n = i;
#pragma omp taskwait
  if (n != 7)
    __builtin_abort ();
}

For grid, you want Martin to write a testcase ;).
Regarding finalize_task_copyfn, this is for an artificial function created for
constructors of firstprivate vars in task, like:
struct S { S (); ~S (); S (const S &); };
void foo (S &);

void
bar ()
{
  S s;
#pragma omp task firstprivate (s)
  foo (s);
}
The *cpyfn* for this looks like:
  try
    {
      {
        .omp_data_o.3_1 = .omp_data_o;
        _2 = &.omp_data_o.3_1->s;
        _3 = .omp_data_i->s;
        S::S (_2, _3);
        return;
      }
    }
  catch
    {
      <<<eh_must_not_throw (terminate)>>>
    }
and is not actually outlined from the original function, but rather constructed
from scratch.  Couldn't get ICE on it, so let's ignore that for now.

Reply via email to