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

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

// PR c++/88976
// { dg-do compile }

template <class T> void
foo (T x)
{
#pragma omp parallel
  {
  #pragma omp cancel parallel if (x)	// { dg-error "no match for" }
  }
}

struct S {};

void
bar ()
{
  S s;
  foo (s);
}