view gcc/testsuite/g++.dg/gomp/pr71941.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// PR c++/71941
// { dg-do compile }
// { dg-options "-fopenmp" }

struct A { A (); A (A &); ~A (); };

template <int N>
struct B
{
  struct C { A a; C () : a () {} };
  C c;
  void foo ();
};

void
bar ()
{
  B<0> b;
#pragma omp task
  for (int i = 0; i < 2; i++)
    b.foo ();
}