Re: [PATCH] Fix fortran/81509

2017-10-03 Thread Steve Kargl
On Tue, Oct 03, 2017 at 09:38:51PM +0200, Janus Weil wrote: > 2017-10-03 20:10 GMT+02:00 Steve Kargl : > >> > There is no mechanism available to warn the user of nonstandard code. > >> > >> Of course there is: > >> > >> $ gfortran -std=f2008 a.f90 > >> a.f90:4:17: > >> > >> print *, iand(i,j) >

Re: [PATCH] Fix fortran/81509

2017-10-03 Thread Janus Weil
2017-10-03 20:10 GMT+02:00 Steve Kargl : >> > There is no mechanism available to warn the user of nonstandard code. >> >> Of course there is: >> >> $ gfortran -std=f2008 a.f90 >> a.f90:4:17: >> >> print *, iand(i,j) >> 1 >> Error: GNU Extension: Different type kinds at (1) >> >

Re: [PATCH] Fix fortran/81509

2017-10-03 Thread Steve Kargl
On Tue, Oct 03, 2017 at 04:27:15PM +0200, Janus Weil wrote: > >> > >> ... with regards to the F08 standard, which forbids it, yes. I guess > >> that is the nature of a "non-standard extension". It can still give a > >> meaningful result, after the smaller kind is implicitly converted to > >> the la

Re: [PATCH] Fix fortran/81509

2017-10-03 Thread Janus Weil
Hi Steve, >> >> In general one can argue about whether or not it's a good idea to use >> >> non-std extensions. But I think gfortran should rather leave the >> >> choice to its users, whether they want to use 'dirty and covenient' >> >> code or have very strict checking. We have nice mechanisms fo

Re: [PATCH] Fix fortran/81509

2017-10-01 Thread Steve Kargl
On Sun, Oct 01, 2017 at 07:42:09PM +0200, Janus Weil wrote: > 2017-09-29 16:08 GMT+02:00 Steve Kargl : > > On Fri, Sep 29, 2017 at 11:15:47AM +0200, Janus Weil wrote: > >> Hi Steve, > >> > >> > As aside effect, the patch removes a questionable GNU Fortran > >> > extension that allowed arguments to

Re: [PATCH] Fix fortran/81509

2017-10-01 Thread Janne Blomqvist
On Sun, Oct 1, 2017 at 8:42 PM, Janus Weil wrote: > 2017-09-29 16:08 GMT+02:00 Steve Kargl : >> On Fri, Sep 29, 2017 at 11:15:47AM +0200, Janus Weil wrote: >>> Hi Steve, >>> >>> > As aside effect, the patch removes a questionable GNU Fortran >>> > extension that allowed arguments to IAND, IOR, and

Re: [PATCH] Fix fortran/81509

2017-10-01 Thread Janus Weil
2017-09-29 16:08 GMT+02:00 Steve Kargl : > On Fri, Sep 29, 2017 at 11:15:47AM +0200, Janus Weil wrote: >> Hi Steve, >> >> > As aside effect, the patch removes a questionable GNU Fortran >> > extension that allowed arguments to IAND, IOR, and IEOR to have >> > different kind type parameters. The be

Re: [PATCH] Fix fortran/81509

2017-09-29 Thread Steve Kargl
On Fri, Sep 29, 2017 at 11:15:47AM +0200, Janus Weil wrote: > Hi Steve, > > > As aside effect, the patch removes a questionable GNU Fortran > > extension that allowed arguments to IAND, IOR, and IEOR to have > > different kind type parameters. The behavior of this extension > > was not documented

Re: [PATCH] Fix fortran/81509

2017-09-29 Thread Janus Weil
Hi Steve, > As aside effect, the patch removes a questionable GNU Fortran > extension that allowed arguments to IAND, IOR, and IEOR to have > different kind type parameters. The behavior of this extension > was not documented. I don't really like that part. We were using the nice and convenient

Re: [PATCH] Fix fortran/81509

2017-09-28 Thread Steve Kargl
On Thu, Sep 28, 2017 at 10:46:06AM +0100, Paul Richard Thomas wrote: > > I'll take your word for it on the F2008 contraints. Given that the > patch is very good - OK for trunk. > The text for IAND from F2008 is Arguments. I shall be of type integer or a boz-literal-constant. J shall be of

Re: [PATCH] Fix fortran/81509

2017-09-28 Thread Paul Richard Thomas
Hi Steve, I'll take your word for it on the F2008 contraints. Given that the patch is very good - OK for trunk. Thanks Paul On 27 September 2017 at 20:36, Steve Kargl wrote: > The attached patch fixes PR fortran/81509. > > In short, F2008 now allows boz-literal-constants in IAND, IOR, IEOR, >

[PATCH] Fix fortran/81509

2017-09-27 Thread Steve Kargl
The attached patch fixes PR fortran/81509. In short, F2008 now allows boz-literal-constants in IAND, IOR, IEOR, DSHIFTL, DSHIFTR, and MERGE_BITS. gfortran currently allows BOZ argument, but she was not enforcing restrictions in F2008. The attach patch causes gfortran to conform to F2008. As asi