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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [appendix-a/] [a.24.1.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-effective-target tls } */
3
 
4
extern int omp_get_num_threads (void);
5
int x, y, t, z[1000];
6
#pragma omp threadprivate(x)
7
void
8
a24 (int a)
9
{
10
  const int c = 1;
11
  int i = 0;
12
  int l = 0;
13
#pragma omp parallel default(none) private(a) shared(z)
14
  {
15
    int j = omp_get_num_threads ();
16
    /* O.K. - j is declared within parallel region */
17
    /* O.K.  -  a is listed in private clause */
18
    /*       -  z is listed in shared clause */
19
    x = c;                      /* O.K.  -  x is threadprivate */
20
                                /*       -  c has const-qualified type */
21
    z[i] = y;
22
    /* { dg-error "'i' not specified" "" { target *-*-* } 21 } */
23
    /* { dg-error "enclosing parallel" "" { target *-*-* } 13 } */
24
    /* { dg-error "'y' not specified" "" { target *-*-* } 21 }  */
25
#pragma omp for firstprivate(y)
26
    for (i = 0; i < 10; i++)
27
      {
28
        z[i] = y;               /* O.K. - i is the loop iteration variable */
29
                                /*      - y is listed in firstprivate clause */
30
      }
31
    z[l] = t;
32
    /* { dg-error "'l' not specified" "" { target *-*-* } 31 } */
33
    /* { dg-error "'t' not specified" "" { target *-*-* } 31 }  */
34
  }
35
}

powered by: WebSVN 2.1.0

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