view gcc/testsuite/g++.dg/gomp/requires-2.C @ 19:2b5abeee2509 default tip

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

int i;

void
foo ()
{
  #pragma omp requires unified_address				// { dg-error "may only be used at file or namespace scope" }
  #pragma omp requires unified_shared_memory			// { dg-error "may only be used at file or namespace scope" }
  #pragma omp requires unified_shared_memory unified_address	// { dg-error "may only be used at file or namespace scope" }
  #pragma omp requires dynamic_allocators,reverse_offload	// { dg-error "may only be used at file or namespace scope" }
  #pragma omp requires atomic_default_mem_order(seq_cst)	// { dg-error "may only be used at file or namespace scope" }
  if (0)
    #pragma omp requires unified_address			// { dg-error "may only be used at file or namespace scope" }
    i++;
  if (0)
    #pragma omp requires atomic_default_mem_order(seq_cst)	// { dg-error "may only be used at file or namespace scope" }
    i++;
}

struct S {
  int s;
  #pragma omp requires unified_address				// { dg-error "may only be used at file or namespace scope" }
};