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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [gomp/] [parallel-4.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 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.