From patchwork Tue Jun 18 22:57:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1118379 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-503229-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="J1I34aI8"; 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 45T3Q63nQ6z9s4Y for ; Wed, 19 Jun 2019 08:57:44 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:in-reply-to:references:date:message-id:mime-version :content-type; q=dns; s=default; b=Oeh9P2cYEuL6uPh9QkJrvtJl9DFyB JkEhJxrEhu0sdWLU+7bGgZYJOK7AkpNkbHVyfkclXHTcAXaW0k3m0jVGEyrpn8nm Q1wmNN4kgyNsge+pmEktwrOD8pcdAzC4lw+132DemxXxlmPdqYmGTyNAFKl7JoUM eS2rs4bUlY4XD4= 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:from :to:subject:in-reply-to:references:date:message-id:mime-version :content-type; s=default; bh=/X4u4Mbn2ZB0I7RZ8rHc+b9q8nE=; b=J1I 34aI8+XImP24TdTbB5u8qInVgQ3ptsYn03hJjaiYPW+agzNNOjv81mOsj/X2V2B9 WwxTmqRMG8OL4sbQBsy7QXoHnV8bFWsb1h/RV4Upe9QZOsfsNWHXqGbnIo4VrNlN VyPJug4doBDOzaJUIZ9VkkW+g59Rns7DbvbnUx3A= Received: (qmail 46959 invoked by alias); 18 Jun 2019 22:57:36 -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 46949 invoked by uid 89); 18 Jun 2019 22:57:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Jun 2019 22:57:34 +0000 Received: from svr-orw-mbx-05.mgc.mentorg.com ([147.34.90.205]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hdN2e-0005It-1s from Thomas_Schwinge@mentor.com ; Tue, 18 Jun 2019 15:57:28 -0700 Received: from svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) by SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 18 Jun 2019 15:57:25 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Tue, 18 Jun 2019 15:57:25 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 1E527C2212; Tue, 18 Jun 2019 15:57:25 -0700 (PDT) From: Thomas Schwinge To: , Jakub Jelinek Subject: [committed] [PR90859] Document status quo for "[OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }'" (was: [committed] Test cases to verify OpenACC 'firstprivate' mappings) In-Reply-To: <87r27qfr40.fsf@euler.schwinge.homeip.net> References: <87r27qfr40.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Wed, 19 Jun 2019 00:57:17 +0200 Message-ID: <87lfxyfqnm.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 19 Jun 2019 00:47:27 +0200, I wrote: > I committed to trunk in r272451 a few "Test cases to verify OpenACC > 'firstprivate' mappings" > --- /dev/null > +++ b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c > +static void > +vla (int array_li) > +{ > + _Complex double array[array_li]; > + uint32_t array_so; > +#pragma acc parallel \ > + copyout (array_so) > + /* The gimplifier has created an implicit 'firstprivate' clause for the array > + length. > + { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\)} omplower { target { ! c++ } } } } > + { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(} omplower { target { c++ } } } } > + (C++ computes an intermediate value, so can't scan for 'firstprivate(array_li)'.) */ > + { > + array_so = sizeof array; > + } > + if (array_so != sizeof array) > + __builtin_abort (); > +} It doesn't resolve PR90859, but at least in trunk r272452 we now 'Document status quo for "[OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }'"', see attached. Grüße Thomas From 75fdd6636c07a400578f53fb9d87aa13274819c4 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Tue, 18 Jun 2019 22:15:16 +0000 Subject: [PATCH] [PR90859] Document status quo for "[OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }'" gcc/testsuite/ PR middle-end/90859 * c-c++-common/goacc/firstprivate-mappings-1.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272452 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 3 +++ gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bffa899c7676..59d39e8c179a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2019-06-18 Thomas Schwinge + PR middle-end/90859 + * c-c++-common/goacc/firstprivate-mappings-1.c: Update. + * c-c++-common/goacc/firstprivate-mappings-1.c: New file. * g++.dg/goacc/firstprivate-mappings-1.C: Likewise. diff --git a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c index c8270472a9c5..33576c50ecab 100644 --- a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c +++ b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c @@ -426,6 +426,9 @@ vla (int array_li) { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\)} omplower { target { ! c++ } } } } { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(} omplower { target { c++ } } } } (C++ computes an intermediate value, so can't scan for 'firstprivate(array_li)'.) */ + /* For C, non-LP64, the gimplifier has also created a mapping for the array + itself; PR90859. + { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\) map\(tofrom:\(\*array.[0-9]+\) \[len: D\.[0-9]+\]\) map\(firstprivate:array \[pointer assign, bias: 0\]\) \[} omplower { target { c && { ! lp64 } } } } } */ { array_so = sizeof array; } -- 2.20.1