Mercurial > hg > CbC > CbC_gcc
view libgomp/testsuite/libgomp.c/loop-8.c @ 64:d9bee9007a48
Added tag gcc-4.6-20100522 for changeset b7f97abdc517
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:48:09 +0900 |
parents | a06113de4d67 |
children |
line wrap: on
line source
extern void abort (void); int buf[256]; void __attribute__((noinline)) foo (void) { int i; #pragma omp for schedule (auto) for (i = 0; i < 256; i++) buf[i] += i; } int main (void) { int i; #pragma omp parallel for schedule (auto) for (i = 0; i < 256; i++) buf[i] = i; #pragma omp parallel num_threads (4) foo (); for (i = 0; i < 256; i++) if (buf[i] != 2 * i) abort (); return 0; }