pr32468.c 429 B

123456789101112131415161718192021222324252627
  1. /* PR libgomp/32468 */
  2. /* { dg-do run } */
  3. #include <omp.h>
  4. #include <stdlib.h>
  5. int
  6. main (void)
  7. {
  8. int res[2] = { -1, -1 };
  9. omp_set_dynamic (0);
  10. omp_set_num_threads (4);
  11. #pragma omp parallel
  12. {
  13. #pragma omp sections
  14. {
  15. #pragma omp section
  16. res[0] = omp_get_num_threads () != 4;
  17. #pragma omp section
  18. res[1] = omp_get_num_threads () != 4;
  19. }
  20. }
  21. if (res[0] != 0 || res[1] != 0)
  22. abort ();
  23. return 0;
  24. }