This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Finally, the third change is that a pointer variable "p" and another variable "v" can not reference the same object, if the base type of "p" is not the same as the base type of "v". To demonstrate this consider the example code below extracted from the polyhedron benchmark capacita.f90:
integer, private, pointer, dimension(:,:) :: Grid real, allocatable, dimension(:,:) :: Y
where (Grid == 0) Y = 0 end where
$ cat a.f90 integer :: i(5) real(4) :: x(5) equivalence(x,i)
i = (/ 1, 0, 3, 5, 0 /) where (i == 0) x = -42. end where print *, i end $ gfortran a.f90 && ./a.out 1 -1037565952 3 5 -1037565952
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |