This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran, committed] Fix typos in rand.c and normalize.c
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Schl?ter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: GCC Fortran mailing list <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Jun 2004 20:38:21 -0700
- Subject: Re: [gfortran, committed] Fix typos in rand.c and normalize.c
- References: <40E1F3A3.2000609@physik.uni-muenchen.de>
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