From patchwork Fri Sep 23 10:18:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 674027 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3sgTpr4kd7z9s5w for ; Fri, 23 Sep 2016 20:18:39 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RKE/MkXL; dkim-atps=neutral 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:cc:subject:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=t4ylHvbIW1T/XECv jnJcbUfbYm7EKvaml7FqMFz1DTHrXk/TLHH1/J0Y0ms210JF51P5eBR9fytav0sf e9z5+gkC8qbVi3Yjo5kVACuKI/ZX0kEAK87V9YbnAtBQ8GTE+JTVzCBW8DOvQVMB tmpdEVynvb+iwO1Kfle231fFQHo= 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:cc:subject:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=8JMiQnAr4a8qJhzLEGg7Uq YohRc=; b=RKE/MkXLTj2CI01pJ5jabrmss3YA94c31kAaYKRQOIOQXy9uo3yaIg dpAta7sGWOTEgg3AfnwUHkXb+APVmaHHbHAdZkTdKrOvHJpoZCWcczp0g5Lo0Obm Ets2HPJmi+pGMC7UI8EGfhUXWwEudKxnYuB63AJ+7Z5jaiuL86H8Y= Received: (qmail 11290 invoked by alias); 23 Sep 2016 10:18:26 -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 11270 invoked by uid 89); 23 Sep 2016 10:18:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 spammy=sk:paul.ri, sk:paulri, paulrichardthomasgmailcom, U*paul.richard.thomas X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.18) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Sep 2016 10:18:15 +0000 Received: from vepi2 ([84.63.206.51]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MMkDH-1btBWQ03XL-008dzg; Fri, 23 Sep 2016 12:18:09 +0200 Date: Fri, 23 Sep 2016 12:18:07 +0200 From: Andre Vehreschild To: Paul Richard Thomas Cc: GCC-Patches-ML , GCC-Fortran-ML , Damian Rouson Subject: Re: [Fortran, accaf, patch, v1] Fixing compatibility with opencoarrays (mostly) Message-ID: <20160923121807.0a8def96@vepi2> In-Reply-To: References: <20160922170957.3d711752@vepi2> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; V01:K0:hH3vIZ3Vd3Y=:Ax+G1MXXkb8c73mUuQz092 0QRP22bZd6YuXBVvt6/Wp5eRasbS4OFFyXewCIt3DTs+Oe3y4/ulQtBi2iDExEVZFQprAcmP5 a3HrA8z7OoPWNABN4wuU5kf4oIa+3VVW4tUelq31xtx4yNDqeI6EIIMOLK+xMDe//IkalULPx fbmfXIXceVldKC95QZWlt1+Y6oGLoilNHVXkV0GG6QLPyAqABqCydEXsnBWB2wSeJBTccFFGc bN5mayNO/jzYgnYAF2IQaNbBs/KH1I8+o4CvbLTHsraw8V+PKZBdX9BM02YM5stjjJiJvjAys jKgRBqTUFGw3gZuPtr47iAs08WjNelPGSYSkuuQsfOriZmYF+6Dp28SU1QuOuHHfRAU/47C/O V9yoC9up6vZf2qXFQHLQTb9R8ErDAgAO+aaENYWYQsejWHyDzlac47vG/wYYcWm/aXjE25R+y r1aBi4xlzMwLBgIhzfNL5xNOd0JKhDt4lB0xqeoXg+8wA5myQq8l7584aeLMDKWI0fP7fGKWt IWRn1RgsfXuLgasdBbb82/FmFCCDtc1FlES2b3Jl/2k+i6AC0ZE1uDYhNaz5MxgejKC9u36U2 6vDZNxflpokeAaGjVTm6MOgQVwYQceSfIMw9DU6vndbACC4v2ApxmlIa/Grt4HfIfHVk/oXXn dReGgIJ/zUSjZbqJNVNs5HOBh14K9pEVvF9GpXqdJSPiEF68Wg/YgC9Rp3dIZdEWLYWTDAIQG Yy8BozQZoNd7LHIB42awPEqYd6XApt/8kFVvec2hSQXUmMDXp/pwMn10ENE= Hi Paul, thanks for the review. Committed as r240419. Regards, Andre On Thu, 22 Sep 2016 19:28:49 +0200 Paul Richard Thomas wrote: > Dear Andre, > > Yes, this is fine for trunk. Thanks for fixing it so quickly. > > Best regards > > Paul > > On 22 September 2016 at 17:09, Andre Vehreschild wrote: > > Hi all, > > > > attached patch fixes compatibility with opencoarrays by using the old > > coarray interface of caf_get() as long as possible. > > > > Bootstrapped and regtested ok on x86_64-linux/F23. Ok for trunk? > > > > Regards, > > Andre > > -- > > Andre Vehreschild * Email: vehre ad gmx dot de > > > Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (Revision 240418) +++ gcc/fortran/ChangeLog (Arbeitskopie) @@ -1,3 +1,8 @@ +2016-09-22 Andre Vehreschild + + * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf- + interface where possible. + 2016-09-22 Paul Thomas * interface.c (check_dtio_interface1): Introduce errors for Index: gcc/fortran/trans-intrinsic.c =================================================================== --- gcc/fortran/trans-intrinsic.c (Revision 240418) +++ gcc/fortran/trans-intrinsic.c (Arbeitskopie) @@ -1607,10 +1607,9 @@ else stat = null_pointer_node; - /* Always use the new get_by_ref (). When no allocatable components are - present and the lhs does not reallocation then the "old" get () might - suffice. */ - if (true) //caf_attr->alloc_comp && !may_realloc) + /* Only use the new get_by_ref () where it is necessary. I.e., when the lhs + is reallocatable or the right-hand side has allocatable components. */ + if (caf_attr->alloc_comp || may_realloc) { /* Get using caf_get_by_ref. */ caf_reference = conv_expr_ref_to_caf_ref (&se->pre, array_expr); Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (Revision 240418) +++ gcc/testsuite/ChangeLog (Arbeitskopie) @@ -1,3 +1,8 @@ +2016-09-23 Andre Vehreschild + + * gfortran.dg/coarray_lib_comm_1.f90: Using the old caf-interface + here now. + 2016-09-23 Matthew Wahab * gcc.target/arm/armv8_2-fp16-arith-1.c: Use arm_v8_2a_fp16_neon Index: gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 (Revision 240418) +++ gcc/testsuite/gfortran.dg/coarray_lib_comm_1.f90 (Arbeitskopie) @@ -40,7 +40,7 @@ ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, _gfortran_caf_this_image \\\(0\\\), &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 0, 0B\\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, _gfortran_caf_this_image \\\(0\\\), &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 1, 0B\\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "_gfortran_caf_get_by_ref \\\(caf_token.0, 1, &p, &caf_ref.\[0-9\]+, 4, 4, 1, 0, 0B\\\);" 1 "original" } } -! { dg-final { scan-tree-dump-times "_gfortran_caf_get_by_ref \\\(caf_token.1, 1, &p, &caf_ref.\[0-9\]+, 4, 4, 0, 0, 0B\\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.0, \\\(integer\\\(kind=8\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=8\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 1, 0B\\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "_gfortran_caf_get \\\(caf_token.1, \\\(integer\\\(kind=8\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=8\\\)\\\) b, 1, &parm.\[0-9\]+, 0B, &p, 4, 4, 0, 0B\\\);" 1 "original" } } ! { dg-final { scan-tree-dump-times "_gfortran_caf_sendget \\\(caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, caf_token.0, \\\(integer\\\(kind=\[48\]\\\)\\\) parm.\[0-9\]+.data - \\\(integer\\\(kind=\[48\]\\\)\\\) a, 1, &parm.\[0-9\]+, 0B, 4, 4, 0, 0B\\\);" 1 "original" } }