From patchwork Fri Oct 14 08:52:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 682166 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 3swLwf1pkTz9t0v for ; Fri, 14 Oct 2016 19:53:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=t2mSOsss; 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:subject:message-id:in-reply-to:references:mime-version :content-type; q=dns; s=default; b=q139WN5NlmWfkk9PZnAewbpsmZWyy JLqVVKLr3z4owhnleBoc/b7n/GPG5UFsK5aEdZLPLHOeBjQF6TyVr1bbqtKEysZf rEkgu2FQqfaAt32Z5HX78EKCh1RguXDK+auLSLY/wN4fBF32RYi+cAqW3yFI8RB5 64DMZH+axtS4sU= 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:in-reply-to:references:mime-version :content-type; s=default; bh=At24MunFjdTkPYdhm7qiqa4pJWI=; b=t2m SOsss1dQWvFqGTVTF9jfpQtTnrzVH1/mSoe/s6YiWZO/LupV7dz0EIkwE5OyXnTL EzeR32AfNg2dQ9ILTBeCveDP/7kDHHpkDmyPTnQcJm0/wiIsFOiHuEwBU5DaowYQ t87UaHaT9aLGOSIqQRPv0l6YiKEzQrOFkgdeHjV4= Received: (qmail 15283 invoked by alias); 14 Oct 2016 08:53:11 -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 15261 invoked by uid 89); 14 Oct 2016 08:53:10 -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=arbeitskopie, Arbeitskopie, spellcheck_1.c, UD:spellcheck_1.c X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Oct 2016 08:53:00 +0000 Received: from vepi2 ([84.63.206.51]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0Lu8Ri-1cwBA71isg-011VyZ; Fri, 14 Oct 2016 10:52:57 +0200 Date: Fri, 14 Oct 2016 10:52:56 +0200 From: Andre Vehreschild To: GCC-Patches-ML , GCC-Fortran-ML Subject: Re: [Fortran, patch, caf] Add unimplemented message for polymorphic objects with allocatable/pointer components Message-ID: <20161014105256.0f7233f5@vepi2> In-Reply-To: <20161013174508.1a69e4d2@vepi2> References: <20161013174508.1a69e4d2@vepi2> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; V01:K0:P/7SnvA3feY=:p2ZVSQFigETAHClaKQNVeC cb944XZVv0//bxVhHywUoluNDzMYKk4TBmCnCmVVBP2EO31Smv5PWWMnCv1ysek3R4GLK9uqP Hxb5O6mJPajBC+vM8/1nshZcWT6K7FDxo1fI7qjY6Masz1kWd3OCS90aIqNiWzakGxyrBf/Io pUGKfoCOnyKCUBmDqO7Vfo0TOYiF03bdw1xi3+235rvdOq4DWN4uVBdz55Yy+azFut59XAw3M UzQf/ZzBi32vdNrHyuSLq4e/QJorQPezHIng/es2rfiFh8eqRHSxitI69YGX/G6veJUsiXJc0 +HqHh+XkXcwF2/oBi/CHamzYBFuGdkgvMAuExgmLZ7cgXYAf35PLLLC3DFXpBDCHssPYA1sHQ 9TSKlNZHraXJrlhllFJlje4DnS6jwVjyPOH5DalIiPApPyDH+qdX5C7TV5rkZ7bxKUDTQTjii AxlSRf+lfC/Twciw2gDRpdXvr6tWSYoVL1Nj77Qh8NJpr13R1kWalwBkl1Irt0ChsO0H31mnA d0hrklJ0sbSAjXWkqAEcREHapXQN2guBM8ffOX9Yc4gDjVSSAyxpgpktTUzYu25Sl+YziIsnJ 11Pet60OP2HChvDzVht4JKfm3yM63d/seIy1LjOckAZfeUuHg2l2S51mqicosijDg0fX0DoX0 84G7zy4YVi05bE13BqdrDhMYWm/U35IdbnLbwk9UR47UVmFcNG91Z4vKwmz9NYBq8A/273JbJ E8FSpl0cR7C8v8BkzJlwtboh8j0B2z/9SfVuUZsWrqBBFCXYFXOKv7Ul1pM= Hi all, commited as r241150. Regards, Andre On Thu, 13 Oct 2016 17:45:08 +0200 Andre Vehreschild wrote: > Hi all, > > attached patch adds an unimplemented message, when a polymorphic coarray > object with allocatable/pointer components is declared for coarray mode > library. This is just an ad-hoc solution until handling those constructs is > implemented. There are already some prs that address ICEs caused by this > issue: 77961, 77785. > > Bootstrapped and regtests ok on x86_64-linux/F23. May have some fuzz when the > patch for polymorphic assign: > > https://gcc.gnu.org/ml/fortran/2016-10/msg00091.html > > is not present. The polymorphic assign patch is not necessary for this patch. > > If no one objects, I will commit tomorrow morning. > > Regards, > Andre Index: gcc/fortran/ChangeLog =================================================================== --- gcc/fortran/ChangeLog (Revision 241149) +++ gcc/fortran/ChangeLog (Arbeitskopie) @@ -1,3 +1,8 @@ +2016-10-14 Andre Vehreschild + + * resolve.c (resolve_symbol): Add unimplemented message for + polymorphic types with allocatable/pointer components and coarray=lib. + 2016-10-13 Thomas Preud'homme * trans-intrinsic.c: Include memmodel.h. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (Revision 241149) +++ gcc/fortran/resolve.c (Arbeitskopie) @@ -13787,6 +13787,19 @@ (just like derived type declaration symbols have flavor FL_DERIVED). */ gcc_assert (sym->ts.type != BT_UNION); + /* Coarrayed polymorphic objects with allocatable or pointer components are + yet unsupported for -fcoarray=lib. */ + if (flag_coarray == GFC_FCOARRAY_LIB && sym->ts.type == BT_CLASS + && sym->ts.u.derived && CLASS_DATA (sym) + && CLASS_DATA (sym)->attr.codimension + && (sym->ts.u.derived->attr.alloc_comp + || sym->ts.u.derived->attr.pointer_comp)) + { + gfc_error ("Sorry, allocatable/pointer components in polymorphic (CLASS) " + "type coarrays at %L are unsupported", &sym->declared_at); + return; + } + if (sym->attr.artificial) return; Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (Revision 241149) +++ gcc/testsuite/ChangeLog (Arbeitskopie) @@ -1,3 +1,7 @@ +2016-10-14 Andre Vehreschild + + * gfortran.dg/coarray_38.f90: Expect error message. + 2016-10-14 Kyrylo Tkachov * gcc.target/aarch64/spellcheck_1.c: New test. Index: gcc/testsuite/gfortran.dg/coarray_38.f90 =================================================================== --- gcc/testsuite/gfortran.dg/coarray_38.f90 (Revision 241149) +++ gcc/testsuite/gfortran.dg/coarray_38.f90 (Arbeitskopie) @@ -71,7 +71,7 @@ type t2 class(t), allocatable :: caf2[:] end type t2 -class(t), allocatable :: caf[:] +class(t), allocatable :: caf[:] ! { dg-error "Sorry, allocatable/pointer components in polymorphic" } type(t) :: x type(t2) :: y