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

--- Comment #2 from qinzhao at gcc dot gnu.org ---
simplified testing case:
[opc@qinzhao-ol8u3-x86 106123]$ cat  t.C
struct T { T () {}; virtual ~T () {}; int t; };
struct S : virtual public T { int a; void foo (); };
template <typename T>
struct U { U () {}; virtual ~U () {}; T t; };
template <typename T>
struct V : virtual public U<T> { T a; void foo (); };

void
S::foo ()
{
#pragma omp parallel
  {
    #pragma omp taskloop firstprivate (a, t) lastprivate (t)
    for (int i = 0; i < a; i++)
      t++;
  }
}

void
bar ()
{
  V<int> v;
  v.foo ();
}

Reply via email to