Mercurial > hg > CbC > CbC_gcc
view libgomp/testsuite/libgomp.c++/loop-7.C @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children |
line wrap: on
line source
// PR c++/24502 // { dg-do run } extern "C" void abort (); template <typename T> T foo (T r) { T i; #pragma omp for for (i = 0; i < 10; i++) r += i; return r; } int main () { if (foo (0) != 10 * 9 / 2 || foo (2L) != 10L * 9 / 2 + 2) abort (); return 0; }