From patchwork Wed Oct 10 11:17:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 981783 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-487249-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="BT37xvLj"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42VWmQ6pN8z9s7T for ; Wed, 10 Oct 2018 22:17:58 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=hxWmiVGFlKo9SuxjBvkWPnGdYvSXPUml2IunL6A2IdJ jopHdr8MKC3FQIFNyCkzmFITca385msgbYv28In4YpNlMz2j1DGe6sd0h1JLinLA i/cFrIP7Kv2K8bBoOLxtmnYDEANTHTF7hjQeccCy0WRdcousXQs7RaS+faNiPF4g = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=oJvOs2BFutLd5P+jcEXhkNjl2DY=; b=BT37xvLj5SGGg6SG+ ggRwW2OtexAlOW3tdkxZzJjFuJv8r+Q9H20xt2q3It7zu7T/kJcQQ8WE8F/bSwxK iO9SzelR2Y7uvnfEkvNLer5GuujIg+cIpCRbEnFomJRclX2G2v7b1f51k/cYamPs a8FlGUKcuUrSnGB/GblIcpclig= Received: (qmail 58278 invoked by alias); 10 Oct 2018 11:17:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 58157 invoked by uid 89); 10 Oct 2018 11:17:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=6798, 6, indirect_ref, sk:omp_tas, INDIRECT_REF X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 10 Oct 2018 11:17:39 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F9C43002C60 for ; Wed, 10 Oct 2018 11:17:38 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-222.ams2.redhat.com [10.36.117.222]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1A225D9C9 for ; Wed, 10 Oct 2018 11:17:37 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w9ABHZLL007990 for ; Wed, 10 Oct 2018 13:17:35 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w9ABHYZj007989 for gcc-patches@gcc.gnu.org; Wed, 10 Oct 2018 13:17:34 +0200 Date: Wed, 10 Oct 2018 13:17:34 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [gomp5] Fix task reduction VLA handling Message-ID: <20181010111734.GU11625@tucnak> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes Hi! This patch adds testcases to cover the case when C/C++ array task reductions are used with VLAs, either whole VLAs or array sections from them. Tested on x86_64-linux, committed to gomp-5_0-branch. 2018-10-10 Jakub Jelinek * omp-low.c (lower_rec_input_clauses): Handle VLAs properly. (lower_omp_task_reductions): Likewise. * gimplify.c (enum omp_region_type): Add ORT_TASKGROUP. (gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable, omp_is_private, omp_check_private, gimplify_omp_depend): Handle ORT_TASKGROUP like ORT_WORKSHARE. (omp_add_variable): Don't add private/firstprivate for VLAs in ORT_TASKGROUP. (gimplify_expr) : Move handling into a separate case, make sure to scan omp clauses before gimplifying body. * testsuite/libgomp.c-c++-common/task-reduction-5.c (size_t): New typedef. (bar): Use it instead of __SIZE_TYPE__ directly. (foo): Likewise. Use (~(size_t) 0) instead of __SIZE_MAX__. * testsuite/libgomp.c/task-reduction-1.c: New test. * testsuite/libgomp.c++/task-reduction-7.C: New test. Jakub --- gcc/omp-low.c.jj 2018-10-09 14:19:54.672380754 +0200 +++ gcc/omp-low.c 2018-10-09 17:56:27.620900824 +0200 @@ -3909,7 +3909,10 @@ lower_rec_input_clauses (tree clauses, g if (TREE_CODE (orig_var) == INDIRECT_REF) x = build_simple_mem_ref (x); else if (TREE_CODE (orig_var) == ADDR_EXPR) - x = build_fold_addr_expr (x); + { + if (var == TREE_OPERAND (orig_var, 0)) + x = build_fold_addr_expr (x); + } bias = fold_convert (sizetype, bias); x = fold_convert (ptr_type_node, x); x = fold_build2_loc (clause_loc, POINTER_PLUS_EXPR, @@ -6798,6 +6801,7 @@ lower_omp_task_reductions (omp_context * var = TREE_OPERAND (var, 0); else if (TREE_CODE (var) == INDIRECT_REF) var = TREE_OPERAND (var, 0); + tree orig_var = var; if (is_variable_sized (var)) { gcc_assert (DECL_HAS_VALUE_EXPR_P (var)); @@ -6807,7 +6811,9 @@ lower_omp_task_reductions (omp_context * gcc_assert (DECL_P (var)); } t = ref = maybe_lookup_decl_in_outer_ctx (var, ctx); - if (TREE_CODE (v) == ADDR_EXPR) + if (orig_var != var) + gcc_assert (TREE_CODE (v) == ADDR_EXPR); + else if (TREE_CODE (v) == ADDR_EXPR) t = build_fold_addr_expr (t); else if (TREE_CODE (v) == INDIRECT_REF) t = build_fold_indirect_ref (t); --- gcc/gimplify.c.jj 2018-10-09 14:13:25.243928507 +0200 +++ gcc/gimplify.c 2018-10-10 11:55:27.444973925 +0200 @@ -122,6 +122,7 @@ enum gimplify_omp_var_data enum omp_region_type { ORT_WORKSHARE = 0x00, + ORT_TASKGROUP = 0x01, ORT_SIMD = 0x04, ORT_PARALLEL = 0x08, @@ -759,6 +760,7 @@ gimple_add_tmp_var (tree tmp) struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp; while (ctx && (ctx->region_type == ORT_WORKSHARE + || ctx->region_type == ORT_TASKGROUP || ctx->region_type == ORT_SIMD || ctx->region_type == ORT_ACC)) ctx = ctx->outer_context; @@ -6674,6 +6676,7 @@ omp_firstprivatize_variable (struct gimp omp_add_variable (ctx, decl, GOVD_MAP | GOVD_MAP_TO_ONLY); } else if (ctx->region_type != ORT_WORKSHARE + && ctx->region_type != ORT_TASKGROUP && ctx->region_type != ORT_SIMD && ctx->region_type != ORT_ACC && !(ctx->region_type & ORT_TARGET_DATA)) @@ -6787,7 +6790,7 @@ omp_add_variable (struct gimplify_omp_ct replacement is private, else FIRSTPRIVATE since we'll need the address of the original variable either for SHARED, or for the copy into or out of the context. */ - if (!(flags & GOVD_LOCAL)) + if (!(flags & GOVD_LOCAL) && ctx->region_type != ORT_TASKGROUP) { if (flags & GOVD_MAP) nflags = GOVD_MAP | GOVD_MAP_TO_ONLY | GOVD_EXPLICIT; @@ -7316,6 +7319,7 @@ omp_notice_variable (struct gimplify_omp if (n == NULL) { if (ctx->region_type == ORT_WORKSHARE + || ctx->region_type == ORT_TASKGROUP || ctx->region_type == ORT_SIMD || ctx->region_type == ORT_ACC || (ctx->region_type & ORT_TARGET_DATA) != 0) @@ -7437,6 +7441,7 @@ omp_is_private (struct gimplify_omp_ctx } if (ctx->region_type != ORT_WORKSHARE + && ctx->region_type != ORT_TASKGROUP && ctx->region_type != ORT_SIMD && ctx->region_type != ORT_ACC) return false; @@ -7494,6 +7499,7 @@ omp_check_private (struct gimplify_omp_c } } while (ctx->region_type == ORT_WORKSHARE + || ctx->region_type == ORT_TASKGROUP || ctx->region_type == ORT_SIMD || ctx->region_type == ORT_ACC); return false; @@ -7693,6 +7699,7 @@ gimplify_omp_depend (tree *list_p, gimpl struct gimplify_omp_ctx *ctx = gimplify_omp_ctxp; while (ctx && (ctx->region_type == ORT_WORKSHARE + || ctx->region_type == ORT_TASKGROUP || ctx->region_type == ORT_SIMD || ctx->region_type == ORT_ACC)) ctx = ctx->outer_context; @@ -12831,7 +12838,6 @@ gimplify_expr (tree *expr_p, gimple_seq case OMP_SECTION: case OMP_MASTER: - case OMP_TASKGROUP: case OMP_ORDERED: case OMP_CRITICAL: { @@ -12847,24 +12853,6 @@ gimplify_expr (tree *expr_p, gimple_seq case OMP_MASTER: g = gimple_build_omp_master (body); break; - case OMP_TASKGROUP: - { - gimple_seq cleanup = NULL; - tree fn - = builtin_decl_explicit (BUILT_IN_GOMP_TASKGROUP_END); - g = gimple_build_call (fn, 0); - gimple_seq_add_stmt (&cleanup, g); - g = gimple_build_try (body, cleanup, GIMPLE_TRY_FINALLY); - body = NULL; - gimple_seq_add_stmt (&body, g); - tree *pclauses = &OMP_TASKGROUP_CLAUSES (*expr_p); - gimplify_scan_omp_clauses (pclauses, pre_p, ORT_WORKSHARE, - OMP_TASKGROUP); - gimplify_adjust_omp_clauses (pre_p, body, pclauses, - OMP_TASKGROUP); - g = gimple_build_omp_taskgroup (body, *pclauses); - } - break; case OMP_ORDERED: g = gimplify_omp_ordered (*expr_p, body); break; @@ -12884,6 +12872,28 @@ gimplify_expr (tree *expr_p, gimple_seq gimplify_seq_add_stmt (pre_p, g); ret = GS_ALL_DONE; break; + } + + case OMP_TASKGROUP: + { + gimple_seq body = NULL; + + tree *pclauses = &OMP_TASKGROUP_CLAUSES (*expr_p); + gimplify_scan_omp_clauses (pclauses, pre_p, ORT_TASKGROUP, + OMP_TASKGROUP); + gimplify_adjust_omp_clauses (pre_p, NULL, pclauses, OMP_TASKGROUP); + gimplify_and_add (OMP_BODY (*expr_p), &body); + gimple_seq cleanup = NULL; + tree fn = builtin_decl_explicit (BUILT_IN_GOMP_TASKGROUP_END); + gimple *g = gimple_build_call (fn, 0); + gimple_seq_add_stmt (&cleanup, g); + g = gimple_build_try (body, cleanup, GIMPLE_TRY_FINALLY); + body = NULL; + gimple_seq_add_stmt (&body, g); + g = gimple_build_omp_taskgroup (body, *pclauses); + gimplify_seq_add_stmt (pre_p, g); + ret = GS_ALL_DONE; + break; } case OMP_ATOMIC: --- libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c.jj 2018-10-09 13:56:38.907851288 +0200 +++ libgomp/testsuite/libgomp.c-c++-common/task-reduction-5.c 2018-10-09 15:23:21.860406224 +0200 @@ -1,3 +1,4 @@ +typedef __SIZE_TYPE__ size_t; extern #ifdef __cplusplus "C" @@ -7,7 +8,7 @@ void abort (void); int *q; void -bar (int *p, int *r, int *t, int s, __SIZE_TYPE__ u) +bar (int *p, int *r, int *t, int s, size_t u) { #pragma omp task in_reduction (*: p[0], q[0], r[s - 1], t[0:u + 1]) { @@ -20,7 +21,7 @@ bar (int *p, int *r, int *t, int s, __SI } void -foo (int *p, int *r, int *t, int s, __SIZE_TYPE__ u) +foo (int *p, int *r, int *t, int s, size_t u) { int *p2 = p; #pragma omp taskgroup task_reduction (*: p[0], q[0], r[s], t[0:u + 1]) @@ -38,7 +39,7 @@ foo (int *p, int *r, int *t, int s, __SI t[0] *= 10; t[1] *= 11; } - u = __SIZE_MAX__ / 4; + u = (~(size_t) 0) / 4; s++; p2 = (int *) 0; q = (int *) 0; --- libgomp/testsuite/libgomp.c/task-reduction-1.c.jj 2018-10-09 18:16:16.409159015 +0200 +++ libgomp/testsuite/libgomp.c/task-reduction-1.c 2018-10-09 18:15:55.525504721 +0200 @@ -0,0 +1,137 @@ +typedef __SIZE_TYPE__ size_t; +extern void abort (void); + +void +bar (int *a, int *b, int *c, int (*d)[2], int (*e)[4], size_t n, int f[1][n], int g[1][n * 2]) +{ + #pragma omp task in_reduction (*: a[:n], b[3:n], c[n:n], d[0][:n], e[0][1:n], f[0][:], g[0][1:n]) + { + a[0] *= 12; + a[1] *= 13; + b[3] *= 14; + b[4] *= 15; + c[n] *= 16; + c[n + 1] *= 17; + d[0][0] *= 18; + d[0][1] *= 19; + e[0][1] *= 20; + e[0][2] *= 21; + f[0][0] *= 22; + f[0][1] *= 23; + g[0][1] *= 24; + g[0][2] *= 25; + } +} + +void +foo (size_t n, void *x, void *y, int f[1][n], int g[1][n * 2]) +{ + int a[n], b[n + 3], c[2 * n]; + int (*d)[n] = (int (*)[n]) x; + int (*e)[n * 2] = (int (*)[n * 2]) y; + int i; + for (i = 0; i < n; i++) + { + a[i] = 1; + b[i + 3] = 1; + c[i + n] = 1; + d[0][i] = 1; + e[0][i + 1] = 1; + f[0][i] = 1; + g[0][i + 1] = 1; + } + #pragma omp taskgroup task_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f[0][:], g[0][1:n]) + { + bar (a, b, c, (int (*)[2]) d, (int (*)[4]) e, n, f, g); + #pragma omp task in_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f[0][:], g[0][1:n]) + { + a[0] *= 2; + a[1] *= 3; + b[3] *= 4; + b[4] *= 5; + c[n] *= 6; + c[n + 1] *= 7; + d[0][0] *= 8; + d[0][1] *= 9; + e[0][1] *= 10; + e[0][2] *= 11; + f[0][0] *= 12; + f[0][1] *= 13; + g[0][1] *= 14; + g[0][2] *= 15; + } + n = 0; + } + if (a[0] != 24 || a[1] != 39 || b[3] != 56 || b[4] != 75) + abort (); + if (c[2] != 96 || c[3] != 119 || d[0][0] != 144 || d[0][1] != 171) + abort (); + if (e[0][1] != 200 || e[0][2] != 231 || f[0][0] != 264 || f[0][1] != 299) + abort (); + if (g[0][1] != 336 || g[0][2] != 375) + abort (); +} + +void +baz (size_t n, void *x, void *y, int f[1][n], int g[1][n * 2]) +{ + int a[n], b[n + 3], c[2 * n]; + int (*d)[n] = (int (*)[n]) x; + int (*e)[n * 2] = (int (*)[n * 2]) y; + int i; + for (i = 0; i < n; i++) + { + a[i] = 1; + b[i + 3] = 1; + c[i + n] = 1; + d[0][i] = 1; + e[0][i + 1] = 1; + f[0][i] = 1; + g[0][i + 1] = 1; + } + #pragma omp parallel num_threads(2) + #pragma omp master + #pragma omp taskgroup task_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f[0][:], g[0][1:n]) + { + bar (a, b, c, (int (*)[2]) d, (int (*)[4]) e, n, f, g); + #pragma omp task in_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f[0][:], g[0][1:n]) + { + a[0] *= 2; + a[1] *= 3; + b[3] *= 4; + b[4] *= 5; + c[n] *= 6; + c[n + 1] *= 7; + d[0][0] *= 8; + d[0][1] *= 9; + e[0][1] *= 10; + e[0][2] *= 11; + f[0][0] *= 12; + f[0][1] *= 13; + g[0][1] *= 14; + g[0][2] *= 15; + } + n = 0; + } + if (a[0] != 24 || a[1] != 39 || b[3] != 56 || b[4] != 75) + abort (); + if (c[2] != 96 || c[3] != 119 || d[0][0] != 144 || d[0][1] != 171) + abort (); + if (e[0][1] != 200 || e[0][2] != 231 || f[0][0] != 264 || f[0][1] != 299) + abort (); + if (g[0][1] != 336 || g[0][2] != 375) + abort (); +} + +int +main () +{ + int d[1][2], e[1][4], f[1][2], g[1][4]; + volatile int two; + two = 2; + #pragma omp parallel num_threads (2) + #pragma omp master + foo (two, (void *) d, (void *) e, f, g); + baz (two, (void *) d, (void *) e, f, g); + return 0; +} --- libgomp/testsuite/libgomp.c++/task-reduction-7.C.jj 2018-10-10 12:29:44.335589619 +0200 +++ libgomp/testsuite/libgomp.c++/task-reduction-7.C 2018-10-10 12:19:11.890170681 +0200 @@ -0,0 +1,145 @@ +typedef __SIZE_TYPE__ size_t; +extern "C" void abort (); + +void +bar (int *a, int *b, int *c, int (*d)[2], int (*e)[4], int *f, int *g, size_t n) +{ + #pragma omp task in_reduction (*: a[:n], b[3:n], c[n:n], d[0][:n], e[0][1:n], f[:n], g[1:n]) + { + a[0] *= 12; + a[1] *= 13; + b[3] *= 14; + b[4] *= 15; + c[n] *= 16; + c[n + 1] *= 17; + d[0][0] *= 18; + d[0][1] *= 19; + e[0][1] *= 20; + e[0][2] *= 21; + f[0] *= 22; + f[1] *= 23; + g[1] *= 24; + g[2] *= 25; + } +} + +void +foo (size_t n, void *x, void *y) +{ + int a[n], b[n + 3], c[2 * n]; + int (*d)[n] = (int (*)[n]) x; + int (*e)[n * 2] = (int (*)[n * 2]) y; + int fb[n], gb[n * 2]; + int (&f)[n] = fb; + int (&g)[n * 2] = gb; + int i; + for (i = 0; i < n; i++) + { + a[i] = 1; + b[i + 3] = 1; + c[i + n] = 1; + d[0][i] = 1; + e[0][i + 1] = 1; + f[i] = 1; + g[i + 1] = 1; + } + #pragma omp taskgroup task_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f, g[1:n]) + { + bar (a, b, c, (int (*)[2]) d, (int (*)[4]) e, &f[0], &g[0], n); + #pragma omp task in_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f, g[1:n]) + { + a[0] *= 2; + a[1] *= 3; + b[3] *= 4; + b[4] *= 5; + c[n] *= 6; + c[n + 1] *= 7; + d[0][0] *= 8; + d[0][1] *= 9; + e[0][1] *= 10; + e[0][2] *= 11; + f[0] *= 12; + f[1] *= 13; + g[1] *= 14; + g[2] *= 15; + } + n = 0; + } + if (a[0] != 24 || a[1] != 39 || b[3] != 56 || b[4] != 75) + abort (); + if (c[2] != 96 || c[3] != 119 || d[0][0] != 144 || d[0][1] != 171) + abort (); + if (e[0][1] != 200 || e[0][2] != 231 || f[0] != 264 || f[1] != 299) + abort (); + if (g[1] != 336 || g[2] != 375) + abort (); +} + +void +baz (size_t n, void *x, void *y) +{ + int a[n], b[n + 3], c[2 * n]; + int (*d)[n] = (int (*)[n]) x; + int (*e)[n * 2] = (int (*)[n * 2]) y; + int fb[n], gb[n * 2]; + int i; + for (i = 0; i < n; i++) + { + a[i] = 1; + b[i + 3] = 1; + c[i + n] = 1; + d[0][i] = 1; + e[0][i + 1] = 1; + fb[i] = 1; + gb[i + 1] = 1; + } + #pragma omp parallel num_threads(2) + #pragma omp master + { + int (&f)[n] = fb; + int (&g)[n * 2] = gb; + #pragma omp taskgroup task_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f, g[1:n]) + { + bar (a, b, c, (int (*)[2]) d, (int (*)[4]) e, &f[0], &g[0], n); + #pragma omp task in_reduction (*: a, b[3:n], c[n:n], d[0][:n], e[0][1:n], f, g[1:n]) + { + a[0] *= 2; + a[1] *= 3; + b[3] *= 4; + b[4] *= 5; + c[n] *= 6; + c[n + 1] *= 7; + d[0][0] *= 8; + d[0][1] *= 9; + e[0][1] *= 10; + e[0][2] *= 11; + f[0] *= 12; + f[1] *= 13; + g[1] *= 14; + g[2] *= 15; + } + n = 0; + } + } + if (a[0] != 24 || a[1] != 39 || b[3] != 56 || b[4] != 75) + abort (); + if (c[2] != 96 || c[3] != 119 || d[0][0] != 144 || d[0][1] != 171) + abort (); + if (e[0][1] != 200 || e[0][2] != 231 || fb[0] != 264 || fb[1] != 299) + abort (); + if (gb[1] != 336 || gb[2] != 375) + abort (); +} + +int +main () +{ + int d[2], e[4]; + volatile int two; + two = 2; + #pragma omp parallel num_threads (2) + #pragma omp master + foo (two, (void *) d, (void *) e); + baz (two, (void *) d, (void *) e); + return 0; +}