view gcc/testsuite/g++.dg/gomp/pr35328.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

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

struct A
{
  ~A ()();		// { dg-error "declared as function returning a function" }
};
struct B
{
  B ()();		// { dg-error "declared as function returning a function" }
};
struct C
{
  C ();
  C (const C &)();	// { dg-error "declared as function returning a function" }
};

void
foo ()
{
  A a;
  B b;
  C c;
  #pragma omp parallel firstprivate (a)
    ;
  #pragma omp parallel private (b)
    ;
  #pragma omp parallel firstprivate (c)
    ;
}