ran intrinsic bug?

Jerry DeLisle jvdelisle@verizon.net
Sat Feb 26 20:32:00 GMT 2005


Is this a new bug?  Compiles and runs with no error with g77.

[jerry@quantum bench]$ cat bug1000.f
       subroutine matgen(a,lda,n,b,norma)
       integer lda,n,init(4),i,j
       double precision a(lda,1),b(1),norma,ran
c
       init(1) = 1
       init(2) = 2
       init(3) = 3
       init(4) = 1325
       norma = 0.0
       do 30 j = 1,n
          do 20 i = 1,n
             a(i,j) = ran(init) - .5
             norma = dmax1(dabs(a(i,j)), norma)
    20    continue
    30 continue

       return
       end
[jerry@quantum bench]$ f95 -c bug1000.f
  In file bug1000.f:12

             a(i,j) = ran(init) - .5
                         1
Error: 'i' argument of 'ran' intrinsic at (1) must be a scalar



More information about the Fortran mailing list