OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [clause-3.C] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }
// { dg-require-effective-target tls }

#define p parallel

extern void bar (void);
extern char q[]; // { dg-error "has incomplete type" }
int t;
#pragma omp threadprivate (t)

void
foo (int x)
{
  char *p;
  struct S { int i; int j; } s;
  char a[32];
  double d;
  int i;
  const int c = 8;
#pragma omp p shared (x, x) // { dg-error "more than once" }
    ;
#pragma omp p private (x) private (x) // { dg-error "more than once" }
    ;
#pragma omp p shared (x) firstprivate (x) // { dg-error "more than once" }
    ;
#pragma omp p firstprivate (x, x) // { dg-error "more than once" }
    ;
#pragma omp p for shared (x) lastprivate (x) // { dg-error "more than once" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp p for private (x) lastprivate (x) // { dg-error "more than once" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp p for lastprivate (x, x) // { dg-error "more than once" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp single private (x) copyprivate (x) // { dg-error "more than once" }
    ;
#pragma omp p shared (bar) // { dg-error "is not a variable" }
    ;
#pragma omp p private (bar) // { dg-error "is not a variable" }
    ;
#pragma omp p firstprivate (bar) // { dg-error "is not a variable" }
    ;
#pragma omp p reduction (+:p) // { dg-error "has invalid type for" }
    ;
#pragma omp p reduction (*:s) // { dg-error "has invalid type for" }
    ;
#pragma omp p reduction (-:a) // { dg-error "has invalid type for" }
    ;
  d = 0;
#pragma omp p reduction (*:d)
    ;
#pragma omp p reduction (|:d) // { dg-error "has invalid type for" }
    ;
#pragma omp p reduction (&&:d) // { dg-error "has invalid type for" }
    ;
#pragma omp p copyin (d) // { dg-error "must be 'threadprivate'" }
    ;
#pragma omp p copyin (x) // { dg-error "must be 'threadprivate'" }
    ;
#pragma omp p for firstprivate (x) lastprivate (x)
  for (i = 0; i < 10; i++)
    ;
#pragma omp p private (q) // { dg-error "unspecified bounds" }
    ;
#pragma omp p firstprivate (q) // { dg-error "unspecified bounds" }
    ;
#pragma omp p for lastprivate (q) // { dg-error "unspecified bounds" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp p shared (t) // { dg-error "predetermined 'threadprivate'" }
    ;
#pragma omp p private (t) // { dg-error "predetermined 'threadprivate'" }
    ;
#pragma omp p firstprivate (t) // { dg-error "predetermined 'threadprivate'" }
    ;
#pragma omp p for lastprivate (t) // { dg-error "predetermined 'threadpriv" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp p reduction (*:t) // { dg-error "predetermined 'threadprivate'" }
    ;
#pragma omp p shared (c) // { dg-error "predetermined 'shared'" }
    ;
#pragma omp p private (c) // { dg-error "predetermined 'shared'" }
    ;
#pragma omp p firstprivate (c)
    ;
#pragma omp p for lastprivate (c) // { dg-error "predetermined 'shared'" }
  for (i = 0; i < 10; i++)
    ;
#pragma omp p reduction (*:c) // { dg-error "predetermined 'shared'" }
    ;
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.