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: [Patch libfortran/28452] random intrinsics for large reals


Steve,
   Your proposed change doesn't work here on MacOS X. What seemed more 
appropriate was...

--- random.c    2006-07-29 11:17:22.000000000 -0400
+++ /sw/src/fink.build/gcc4-4.1.999-20060728/gcc-4.2-20060728/libgfortran/intrinsics/random.c   2006-07-29 17:31:04.000000000 -0400
@@ -132,7 +132,7 @@
 /* For REAL(KIND=16), we only need to mask off the lower bits.  */
 
 static inline void
-rnumber_16 (GFC_REAL_16 *v, GFC_UINTEGER_8 v1, GFC_UINTEGER_8 v2)
+rnumber_16 (GFC_REAL_16 *f, GFC_UINTEGER_8 v1, GFC_UINTEGER_8 v2)
 {
   GFC_UINTEGER_8 mask;
 #if GFC_REAL_16_RADIX == 2
@@ -263,6 +263,7 @@
 #ifdef HAVE_GFC_REAL_16
 
 static GFC_UINTEGER_4 * const kiss_seed_3 = kiss_seed + 8;
+static GFC_UINTEGER_4 * const kiss_seed_4 = kiss_seed + 16;
 
 #endif
 
@@ -353,7 +354,7 @@
 #ifdef HAVE_GFC_REAL_16
 
 void
-random_r16 (GFC_REAL_10 *x)
+random_r16 (GFC_REAL_16 *x)
 {
   GFC_UINTEGER_8 kiss1, kiss2;
 

The other changes above included declaring the missing kiss_seed_4 (not
sure if 16 is the correct value to add to kiss_seed) and changing the
GFC_REAL_10 passed to random_r16 to a GFC_REAL_16. I'll run a make check
on the results shortly.
               Jack
ps These errors make me wonder how many other errors are lurking in the
HAVE_GFC_REAL_16 sections of the patch.


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