From 40d7cd0fd78fe2004e2a53c4618c148339b02733 Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Mon, 19 Dec 2011 16:56:54 -0800 Subject: Add gcc-4.6. Synced to @180989 Change-Id: Ie3676586e1d8e3c8cd9f07d022f450d05fa08439 svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile --- gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c (limited to 'gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c') diff --git a/gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c b/gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c new file mode 100644 index 000000000..f52b074ff --- /dev/null +++ b/gcc-4.6/libgomp/testsuite/libgomp.c/nested-2.c @@ -0,0 +1,30 @@ +#include +#include + +int +main (void) +{ + int i = -1, j = -1; + + omp_set_nested (0); + omp_set_dynamic (0); +#pragma omp parallel num_threads (4) + { +#pragma omp single + { + i = omp_get_thread_num () + omp_get_num_threads () * 256; +#pragma omp parallel num_threads (2) + { +#pragma omp single + { + j = omp_get_thread_num () + omp_get_num_threads () * 256; + } + } + } + } + if (i < 4 * 256 || i >= 4 * 256 + 4) + abort (); + if (j != 256 + 0) + abort (); + return 0; +} -- cgit v1.2.3