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: ran intrinsic bug?


On Sat, Feb 26, 2005 at 12:32:58PM -0800, Jerry DeLisle wrote:
> Is this a new bug?  Compiles and runs with no error with g77.

ran is not documented in g77.info, so its hard to guess
what ran() does.  Additionally, 

kargl[206] nm /usr/lib/libg2c.a | grep ran | more -s
srand.o:
         U G77_srand_0
00000000 T srand_
rand.o:
         U G77_rand_0
00000000 T rand_
irand.o:
         U G77_irand_0
00000000 T irand_
irand_.o:
00000000 T G77_irand_0
         U rand
         U srand
srand_.o:
00000000 T G77_srand_0
         U srand
rand_.o:
00000000 T G77_rand_0
         U rand
         U srand

so I'm guessing you are picking ran() up from some other 
library.

Gfortran's implementation of ran() is (semi-) compatible with
HP-UX's F77's ran() [we use a different crappy PRNG].  Gfortrani
makes ran() an alias of rand(), which g77 documents to

     Rand(FLAG)
     Rand: `REAL(KIND=1)' function.
     FLAG: `INTEGER'; OPTIONAL; scalar; INTENT(IN).

-- 
Steve


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