From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74250 invoked by alias); 19 Nov 2016 14:44:47 -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 74175 invoked by uid 89); 19 Nov 2016 14:44:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_20,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*kargl, continuously, promises, anlauf@gmx.de 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; Sat, 19 Nov 2016 14:44:31 +0000 Received: from proton.at.home ([217.232.128.227]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LlV71-1cjMpl2erX-00bIAN; Sat, 19 Nov 2016 15:44:14 +0100 Message-ID: <5830653C.8090303@gmx.de> Date: Sat, 19 Nov 2016 14:44:00 -0000 From: Harald Anlauf User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: kargl@uw.edu CC: Steve Kargl , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: PR69741: Bad error in formal with array scalar loop counters References: <582F8FF4.2070405@gmx.de> <20161119011833.GA27406@troutmask.apl.washington.edu> <583064C0.2030300@gmx.de> In-Reply-To: <583064C0.2030300@gmx.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-UI-Out-Filterresults: notjunk:1;V01:K0:hxZC612+K/c=:dqVwpj+AbGCKLvaRCvXD0Y bdOQ7AjiFfTZE+eE0TrVY06UxyVIM+fbwCOr3parZLPA+4NsL2hPEdKTNXAM37Zbk0S9NzFRY 3KBP4duUjQOabCg47y2L6rBI2kErs1nHmoaDK3IQfAtNG5SQSaAtUiii5Mi9IY8O9IWsH5G6Y 0rhrXXGWya49350ZS34JobD7PRHCvkUzfeESL+5ric8dsmHBu33scrQ0k17GYY/JABpwxbede CtI6GFd1DWqwHj9ZQpHI1W41oH0PmPA0M12ky2yQ8IyP5dHkTT4FjngKICIkV9rOy7bJFMz37 kALnydMkIEPIeWE+evDM1VgXljCrPl+FTj+fQU7Zo+JZXVV8cZ5VYaXu7todKKr21zJJXcxjp mb0PttulGmVLmldm9DgW/QobJ3zTtXNz5goRoI95lWYY45pTeCDzwVX/EehsENFP/bNn4eJDu yn891+eN26gZBCXUtb9XDwdt8nDgINdXqsT/MVyfG4gJD42V21o2RU2ELOut6dfEFE8UtUjnL n4AWz8jMLM7pw21WIVjxP3gp9D2nLr/TfnH19lFzvrDvg2HI3WGav3CEeK3yt0nBaQHlaBwIQ BtiaU2nIJ2uoKeUxlxQUhEW9yK2TDb2+3Rh5JOhE5Ch0x3ackhTkjIbBNtNHBHGx/sGNZMV9n OrGRMBbLdZJrhifD9ZXV57u9wRlSCgBy3PwitFV7R/r5sB1okOdLRU7kpjRPWxrtkD1jswkSV lfahWPifotjWQ4wF59YgMjhuqLN304QFwVmFUgLXY36n9aPhqo3UhH5I9cxpcgLbshLsnRmOJ 29fIrTx X-SW-Source: 2016-11/txt/msg02040.txt.bz2 Sorry, forgot to mention: regtested on i686-pc-linux-gnu Harald On 11/19/16 15:42, Harald Anlauf wrote: > Hi Steve, all, > > On 11/19/16 02:18, Steve Kargl wrote: >> The error message is still not clear. 42 is a scalar integer. Why >> not use the language in the standard? >> >> C739 (R753) The index-name shall be a named scalar variable of type integer. > > I had adjusted the error message to the same appearing in resolve.c > in another place, but you are absolutely right. The attached patch > takes this into account. The testcase is derived from the PR. > >>> >>> Whoever wants to take this one. >>> >> >> Ever thought about getting a commit bit and getting more involved >> in gfortran development? I know 4 or 5 other gentlemen that would >> welcome you with open arms. >> > > Thanks. > > During the stabilization phase of gcc-6 I tried to understand more > of the internals of gfortran. However, most of the time I just got > lost. I therefore decided to tackle a few simple things. > > I don't have the resources to follow the development continuously, > especially when there are changes to ABI or module format. So it > makes more sense for me to wait till the dust settles. > > I'll try to find some time during the current stage 3 to check > whether there are regressions affecting my codes, but no promises. > > Harald > > > 2016-11-19 Harald Anlauf > > PR fortran/69741 > * resolve.c (gfc_resolve_forall): Check for non-scalar index > variables. > > 2016-11-19 Harald Anlauf > > PR fortran/69741 > * gfortran.dg/forall_18.f90: New testcase. > > Index: gfortran.dg/forall_18.f90 > =================================================================== > --- gfortran.dg/forall_18.f90 (revision 0) > +++ gfortran.dg/forall_18.f90 (revision 0) > @@ -0,0 +1,12 @@ > +! { dg-do compile } > +! PR 69741 - improve error message for non-scalar FORALL index variables > +! > +subroutine check > + integer :: ii(2), i, j > + real :: a(3,2) > + > + forall (ii(1)=1:3, ii(2)=1:2) ! { dg-error "scalar variable of type > integer" } > + a(ii(1),ii(2)) = ii(1) * ii(2) > + end forall > + > +end subroutine check > -- Harald Anlauf Dieburger Str. 17 60386 Frankfurt Tel.: (069) 4014 8318