Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c / omp-parallel-if.c
blobb9c27fd1a75878d9d94bf902b6d9ce4f112782f9
1 #include <omp.h>
3 extern void abort (void);
5 int
6 foo (void)
8 return 10;
11 int
12 main ()
14 int A = 0;
16 #pragma omp parallel if (foo () > 10) shared (A)
18 A = omp_get_num_threads ();
21 if (A != 1)
22 abort ();
24 #pragma omp parallel if (foo () == 10) num_threads (3) shared (A)
26 A = omp_get_num_threads ();
29 if (A != 3)
30 abort ();
32 #pragma omp parallel if (foo () == 10) num_threads (foo ()) shared (A)
34 A = omp_get_num_threads ();
37 if (A != 10)
38 abort ();
40 return 0;