This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gfortran, committed] Fix typos in rand.c and normalize.c


On Wed, Jun 30, 2004 at 12:56:35AM +0200, Tobias Schl?ter wrote:
> 
> This patch fixes the rand intrinsic. We didn't actually call rand in it.
> Fixing this involved Paul, Steven and myself, because a wrong comment in
> normalize.c (also fixed) somewhat hampered our IRC conversation.
> 
> Built and tested on i686-pc-linux, approved by Paul on IRC.

Tested?

> -  return normalize_r4_i4 (i - 1, GFC_RAND_M1);
> +  return normalize_r4_i4 (irand (i) - 1, GFC_RAND_M1 - 1);

Index: rand.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/rand.c,v
retrieving revision 1.3
diff -u -b -u -r1.3 rand.c
--- rand.c      29 Jun 2004 22:52:58 -0000      1.3
+++ rand.c      30 Jun 2004 03:37:53 -0000
@@ -82,5 +82,5 @@
 GFC_REAL_4
 prefix(rand) (GFC_INTEGER_4 *i)
 {
-  return normalize_r4_i4 (irand (i) - 1, GFC_RAND_M1 - 1);
+  return normalize_r4_i4 (prefix(irand) (i) - 1, GFC_RAND_M1 - 1);
 }


-- 
Steve


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