From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81372 invoked by alias); 24 Feb 2020 14:50:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 81357 invoked by uid 89); 24 Feb 2020 14:50:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.8 required=5.0 tests=AWL,BAYES_00,KAM_COUK,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=H*f:sk:37db0f3, H*i:sk:37db0f3, H*MI:sk:37db0f3, HContent-Transfer-Encoding:8bit X-HELO: imap3.hz.codethink.co.uk Received: from imap3.hz.codethink.co.uk (HELO imap3.hz.codethink.co.uk) (176.9.8.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Feb 2020 14:50:51 +0000 Received: from [167.98.27.226] (helo=[10.35.4.152]) by imap3.hz.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1j6F4K-0003A0-Ag; Mon, 24 Feb 2020 14:50:48 +0000 Subject: Re: [PATCH] fortran: ICE using undeclared symbol in array constructor, PR93484 To: Thomas Koenig , sgk@troutmask.apl.washington.edu Cc: gcc-patches , fortran References: <20200211152305.GB77655@troutmask.apl.washington.edu> <37db0f3c-6f16-1bc2-9311-e52cfe150497@netcologne.de> From: Mark Eggleston Message-ID: Date: Mon, 24 Feb 2020 14:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <37db0f3c-6f16-1bc2-9311-e52cfe150497@netcologne.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2020-02/txt/msg01313.txt.bz2 On 24/02/2020 14:34, Thomas Koenig wrote: > Hi Mark, > >>> Might need >>> >>>          gfc_reduce_init_expr (e); >>> >>> here.  The kind type parameter should be a constant expression. >> >> Not needed. I've also checked use of the kind argument, it is >> evidently checked elsewhere: if k is allowed to be implicitly >> declared and is used as the kind argument errors are reported that it >> is not a constant, if implicit declaration is not allowed a "has no >> IMPLICIT type" error is produced. > > Is there a test case that covers this already?  OK if such a test > case exists, also OK with such a test case (or if looking for it > is too bother :-) I've had a quick look and there doesn't appear to be a test for using a non-constant for kind arguments. I think a proper set of tests for invalid kind arguments that covers declarations and intrinsic arguments should be added that is separate from this patch.  Should that be done while we're in stage 4 or should it wait for stage 1? In the meantime I'll commit this patch either today or tomorrow. > > Regards > >     Thomas > -- https://www.codethink.co.uk/privacy.html