Hi Thomas,

The patch is ready to go. Please correct the following tiny nits:

s/Check that en expression/Check that an expression/

s/Set this if resolution has already happened and it could be
harmful/Set this if resolution has already happened. It could be
harmful/

An even tinier, probably ignorable one: Why did you break this line?
-/* MINLOC and MAXLOC get special treatment because their argument
-   might have to be reordered.  */

Many thanks for working on this.

Cheers

Paul


On Tue, 23 Oct 2018 at 22:03, Thomas Koenig <tkoe...@netcologne.de> wrote:
>
> Am 23.10.18 um 18:16 schrieb Dominique d'Humières:
> >
>
> >> Anyway, the attached patch fixes this,
> >
> > It now gives the error
> >
> >     4 |    integer, parameter :: I_FINDLOC_BACK(1) = findloc([1,1],1, &
> >        |                                            1
> > Error: transformational intrinsic 'findloc' at (1) is not permitted in an 
> > initialization expression
>
> That error message was misleading, the new one now has
>
> Error: Parameter 'x' at (1) has not been declared or is a variable,
> which does not reduce to a constant expression
>
> > The following test
> >
> > program logtest3
> >     implicit none
> > ! ********************************************************!
> > ! ******* Everything depends on this parameter ***********!
> >
> >     integer, parameter :: A1 = 2
> >     logical :: L
> >     L = transfer(A1,L)
> >     call sub(L)
> > end program logtest3
> >
> > subroutine sub(x)
> >     implicit none
> >     logical x
> >     integer a(1)
> >     character(*), parameter :: strings(2) = ['.TRUE. ','.FALSE.']
> >
> >     a = findloc([1,1],1,mask=[x,.TRUE.])
> >     write(*,'(a)') 'Value by FINDLOC(MASK): '// &
> >        trim(strings(a(1)))
> >     a = findloc([1,1],1,back=x)
> >     write(*,'(a)') 'Value by FINDLOC(BACK): '// &
> >        trim(strings(3-a(1)))
> >
> > end subroutine sub
> >
> > does not link:
> >
> >      8 |    L = transfer(A1,L)
> >        |       1
> > Warning: Assigning value other than 0 or 1 to LOGICAL has undefined result 
> > at (1)
> > Undefined symbols for architecture x86_64:
> >    "__gfortran_findloc0_i4", referenced from:
> >        _sub_ in ccnoLKfH.o
> >    "__gfortran_mfindloc0_i4", referenced from:
> >        _sub_ in ccnoLKfH.o
> > ld: symbol(s) not found for architecture x86_64
> > collect2: error: ld returned 1 exit status
>
> Ah, I didn't include the newly generated files in the previous patch.
> Now included.
>
>
> > Finally the line before the end of findloc_6.f90 should be
> >
> >    if (findloc(ch,"CC ",dim=1,mask=false) /= 0) stop 23
>
> Changed, also the whitespace fixes that Bernhard mentioned.
>
> So, I think this should be clear for trunk now.  I will supply
> the documentation later.
>
> Regards
>
>         Thomas



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

Reply via email to