Re: typespec in forall and implied-do

2022-11-27 Thread Mikael Morin
Le 27/11/2022 à 20:17, Mikael Morin a écrit : Le 21/11/2022 à 19:46, Steve Kargl a écrit : On Mon, Nov 21, 2022 at 11:34:07AM +0100, Mikael Morin wrote: Le 21/11/2022 à 00:31, Steve Kargl via Fortran a écrit : Unfortunately, gfortran does not define a namespace for an implied-do index and use

Re: typespec in forall and implied-do

2022-11-27 Thread Mikael Morin
Le 21/11/2022 à 19:46, Steve Kargl a écrit : On Mon, Nov 21, 2022 at 11:34:07AM +0100, Mikael Morin wrote: Le 21/11/2022 à 00:31, Steve Kargl via Fortran a écrit : Unfortunately, gfortran does not define a namespace for an implied-do index and uses a kludge by adding the attr.implied_index att

Re: typespec in forall and implied-do

2022-11-22 Thread Steve Kargl via Fortran
On Tue, Nov 22, 2022 at 10:15:39PM +0100, Harald Anlauf via Fortran wrote: > Minor addition: > > program foo > implicit none > real(8) :: i > integer, parameter :: q(*) = [(kind(i), integer :: i = 1, 3)] > print *, q > end program foo > > This prints > >8 8

Re: typespec in forall and implied-do

2022-11-22 Thread Harald Anlauf via Fortran
Minor addition: program foo implicit none real(8) :: i integer, parameter :: q(*) = [(kind(i), integer :: i = 1, 3)] print *, q end program foo This prints 8 8 8 although it should be all 4's. So we really need to create a local namespace or even block to

Re: typespec in forall and implied-do

2022-11-20 Thread Steve Kargl via Fortran
On Sun, Nov 20, 2022 at 10:28:40PM +0100, Harald Anlauf via Fortran wrote: > > for unknown reasons I cannot reply to your mail on gmane, > so trying directly via mailing list. > I forgot to address this. I updated my OS on Thursday afternoon, and when I rebooted, sendmail failed to start. It t

Re: typespec in forall and implied-do

2022-11-20 Thread Steve Kargl via Fortran
On Sun, Nov 20, 2022 at 10:28:40PM +0100, Harald Anlauf via Fortran wrote: > Steve, > > for unknown reasons I cannot reply to your mail on gmane, > so trying directly via mailing list. > > I tried your patch, and it works on the supplied testcases. > > However, there is a scoping issue for the d

Re: typespec in forall and implied-do

2022-11-17 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > F2008 introduced the inclusion of a typespec in a forall > statement, and thn F2018 a typespec was allowed in an > implied-do. There may even be a few bug reports. New patch and two test cases (don't know how add testcases

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 04:47:50PM -0800, Steve Kargl via Fortran wrote: > On Wed, Nov 16, 2022 at 04:32:39PM -0800, Steve Kargl via Fortran wrote: > > On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > > > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wr

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 04:32:39PM -0800, Steve Kargl via Fortran wrote: > On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > > F2008 introduced the inclusion of a typespec in a forall > > > state

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Wed, Nov 16, 2022 at 01:30:07PM -0800, Steve Kargl via Fortran wrote: > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > F2008 introduced the inclusion of a typespec in a forall > > statement, and thn F2018 a typespec was allowed in an > > implied-do. There may even

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > F2008 introduced the inclusion of a typespec in a forall > statement, and thn F2018 a typespec was allowed in an > implied-do. There may even be a few bug reports. > New patch. This one handles the example of an implied-

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 06:31:16PM -0800, Steve Kargl via Fortran wrote: > On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > F2008 introduced the inclusion of a typespec in a forall > > statement, and thn F2018 a typespec was allowed in an > > implied-do. There may even

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > This patch allows the above to compile and execute. > It has only had some light testing, and I do not know > if nested forall and implied-do loops do work. Feel > free to commit as I cannot. > Appears to work for nest

Re: typespec in forall and implied-do

2022-11-16 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > > This patch allows the above to compile and execute. > It has only had some light testing, and I do not know > if nested forall and implied-do loops do work. Feel > free to commit as I cannot. For nested implied-do loops

Re: typespec in forall and implied-do

2022-11-15 Thread Steve Kargl via Fortran
On Tue, Nov 15, 2022 at 05:13:19PM -0800, Steve Kargl via Fortran wrote: > F2008 introduced the inclusion of a typespec in a forall > statement, and thn F2018 a typespec was allowed in an > implied-do. There may even be a few bug reports. > Forgot to ask. Anyone know how namespaces work with in