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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [parallel-4.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
 
3
extern int foo(void);
4
extern void bar(void);
5
 
6
int main ()
7
{
8
  /* Malformed uses of 'if' and 'num_threads'.  */
9
  #pragma omp parallel if (foo () > 10) if (foo () == 3) /* { dg-error "too many" } */
10
    {
11
      bar ();
12
    }
13
 
14
  #pragma omp parallel num_threads (3) num_threads (20) /* { dg-error "too many" } */
15
    {
16
      bar ();
17
    }
18
 
19
  /* Valid uses of 'if' and 'num_threads'.  */
20
  #pragma omp parallel if (foo () == 10) num_threads (foo ())
21
    {
22
      bar ();
23
    }
24
}

powered by: WebSVN 2.1.0

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