At 13:37 02-04-2003 +0200, Mike M.wrote:
>----- Original Message -----
>From: "Ian Bush" <[log in to unmask]>
> > Cray Fortran: Version 3.5.0.4 Wed Apr 02, 2003 12:09:21
> > Wot now ? f90 -O -en clf90.f90
> > f90-1221 f90: WARNING in command line
>
> > MODULE pointer_mod
> > ^
> > f90-855 f90: ERROR POINTER_MOD, File = clf90.f90, Line = 16, Column = 8
> > The compiler has detected errors in module "POINTER_MOD". No module
>information file will be created for this module.
> >
> > a1%vect = a2%vect
> > ^
> > f90-1270 f90: ERROR P_VECT_I4_EQUALS_P_VECT_I4_SUB, File = clf90.f90, Line
>= 46, Column = 17
> > "A2" must not be defined inside of a pure subprogram.
> > It is in common, a dummy argument or host or use associated.
>
>As far as I can tell, this is a compiler bug: a2 is a dummy argument of a
>subroutine, not a function, and is not being redefined, but anyway its
>redefinition would be allowed, (like a1's).
>
>Looks like this is a fabulous program for shaking out bugs!
Indeed: I had noticed before that the combination of FORALL and WHERE
creates problems for compilers :-(
My compiler (Salford) produces error messages like:
! *************************************************
! Version 3: FORALL-WHERE nonpointer_version
! *************************************************
integer_array=0
PRINT *
PRINT *,'FORALL-WHERE: non_pointer version'
FORALL (i=1:3:1)
WHERE(logical_array((/1,2/),i)) ! SHAPE = (/ 2 /)
integer_array((4*i-3):(4*i-1):2)= & ! <-- 239
& elemental_nonpointer_fun((/(2*i-1),(2*i)/))
integer_array((4*i-2):(4*i):2)= &
& -elemental_nonpointer_fun((/(2*i-1),(2*i)/))
ELSEWHERE
integer_array((4*i-3):(4*i-1):2)= &
& elemental_nonpointer_fun((/0,0/))
integer_array((4*i-2):(4*i):2)= &
& -elemental_nonpointer_fun((/0,0/))
END WHERE
END FORALL
! D:\Fortran\Test>ftn95 suckling -lin
! [FTN95/Win32 Ver. 3.4.0 Copyright (C) Salford Software Ltd 1993-2003]
! Licensed to: Mr J. van Oosterwijk
! Organisation: TU DELFT
!
! PROCESSING MODULE [<POINTER_MOD> FTN95/Win32 v3.4.0]
! NO ERRORS [<P_VECT_I4_EQUALS_P_VECT_I4_SUB> FTN95/Win32 v3.4.0]
! NO ERRORS [<POINTER_MOD> FTN95/Win32 v3.4.0]
! 0241) integer_array((4*i-2):(4*i):2)= &
! *** The test of the enclosing WHERE statement is rank 1, whereas the left
hand
! side of this assignment is a scalar
! 0239) integer_array((4*i-3):(4*i-1):2)= &
! *** The test of the enclosing WHERE statement is rank 1, whereas the left
hand
! side of this assignment is a scalar
! ERRORS [<ELEMENTAL_POINTER_FUN> FTN95/Win32 v3.4.0]
! NO ERRORS [<ELEMENTAL_NONPOINTER_FUN> FTN95/Win32 v3.4.0]
! NO ERRORS [<TEST_PROG> FTN95/Win32 v3.4.0]
! *** Compilation failed
PRINT '(A,6L6)', 'logical_array: ',logical_array
PRINT '(A,12I3)', 'integer_array: ',integer_array
! - - - - - - - - - -
Another compiler (Absoft) compiles without error messages, but
program aborts with ?? Error after;
D:\Fortran\Test>suckling
DO-IF: nonpointer version
logical_array: T T F F T T
integer_array: 1 -1 2 -2 0 0 0 0 5 -5 6 -6
DO-WHERE: nonpointer version
logical_array: T T F F T T
integer_array: 1 -1 2 -2 0 0 0 0 5 -5 6 -6
FORALL-WHERE: non_pointer version
logical_array: T T F F T T
integer_array: 1 -1 2 -2 0 0 0 0 5 -5 6 -6
DO-IF: pointer version
logical_array: T T F F T T
integer_array: 1 -1 2 -2 0 0 0 0 5 -5 6 -6
DO-WHERE: pointer version
MESSAGE window from Win XP:
Suckling.exe has encountered a problem and needs to close.
We are sorry for the inconvenience.
...
PLEASE TELL MICROSOFT ABOUT THIS PROBLEM.
...
I did not (yet).
>Regards,
>Mike Metcalf
\---
Best regards,
Jan van Oosterwijk | Support bacteria:
Netherlands | They're the only culture some people have.
mailto:Jan.vanOosterwijk<at>DTO.TUDelft.NL
http://huizen.dto<dot>tudelft.nl/vanOosterwijk/
|