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]

ran intrinsic bug?


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


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