00001 /* { dg-do run } */ 00002 00003 #include <stdio.h> 00004 void 00005 work (int k) 00006 { 00007 #pragma omp ordered 00008 printf (" %d\n", k); 00009 } 00010 00011 void 00012 a21 (int lb, int ub, int stride) 00013 { 00014 int i; 00015 #pragma omp parallel for ordered schedule(dynamic) 00016 for (i = lb; i < ub; i += stride) 00017 work (i); 00018 } 00019 00020 int 00021 main () 00022 { 00023 a21 (0, 100, 5); 00024 return 0; 00025 }