This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Use of spread intrinsic
- From: "Neilen Marais" <nmarais at gmail dot com>
- To: <fortran at gcc dot gnu dot org>
- Date: Thu, 09 Jun 2005 14:42:12 +0200
- Subject: Use of spread intrinsic
Hi
In the code I'm trying to compile with gfortran, I came accross
something like this:
PROGRAM ding
IMPLICIT NONE
PRINT*, SPREAD(1.0,1,4)
END PROGRAM ding
Running this program when compiled with gfortran goes off into an
infinite loop, while the intel fortran compiled version gives:
$ ./ding
1.000000 1.000000 1.000000 1.000000
If I change the code to:
PRINT*, SPREAD((/1.0/),1,4)
both ifort and gfortran produce identical output, as above.
Is the first case an extension of some sort, or should both work?
Thanks
Neilen