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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As it works with -DMETHOD -fopenmp, but doesn't with -fopenmp, it must be the
cdtor copying in the FE that breaks this.

struct A {
  int a;
  A (int x) : a (x)
#ifdef METHOD
  {}
  void foo ()
#endif
  {
#pragma omp parallel firstprivate (a)
    --a;
  }
};

int c;

int
main ()
{
  A d(c);
#ifdef METHOD
  d.foo ();
#endif
}

Reply via email to