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]

Re: [Bug libfortran/18495] Intrinisc function SPREAD is broken


Thomas,

I enclose a revised version of the test program that will probably serve as the basis of a testsuite programme. I saw your proposed patch but I am just too dog tired to look at it tonight - I just had a rather unsatisfactory experience with trying to install Fedora Core 3 on my portable - as far as I can tell, and to use the technical term, I have stuffed it totally.

I will be back to look at such things on Sunday.

Tchuess

Paul
program test_spread
   implicit none
   integer, parameter :: N = 100
   integer            :: I
   integer, dimension(N) :: source 
   integer, dimension(N,N) :: sink, check
   do i = 1 , N
      source(i) = N
   end do
   source =(/(i, i=1,N)/)
   check = spread( source , 1 , N ) 
   PRINT *,"first 4x4 elements with DIM=1"
   write(*,'(1x,4I4)') check(1:4,1:4)

   check = spread( source , 2 , N ) 
   PRINT *,"first 4x4 elements with DIM=2"
   write(*,'(1x,4I4)') check(1:4,1:4)

   PRINT *,"The product using temporaries"
   sink = spread( source , 1 , N ) * spread( source , 2 , N )
   write(*,'(1x,4I4)') sink(1:4,1:4)
end program test_spread


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]