[Patch, fortran] PR24174 real(10) and complex(10) array IO broken.
FX Coudert
fxcoudert@gmail.com
Sat Nov 5 18:21:00 GMT 2005
> Ok, here is an updated patch, fixing the above issue.
Most of the patch still looks ok. I'll look into it further tonight.
> While I was at
> it, I also made formatted complex(10) input work in addition to output
> (i.e. fixing PR 24305 as well).
Nice!
> I also made a couple of utility
> functions for determining the size from the kind, and put them in
> their own file.
I don't think we want to have a function call for that. The preprocessor
is your friend:
Index: libgfortran.h
===================================================================
--- libgfortran.h (revision 106521)
+++ libgfortran.h (working copy)
@@ -245,6 +245,12 @@
#define GFC_REAL_16_HUGE LDBL_MAX
#endif
+/* Macros for size of different types and kinds. */
+#define sizeof_logical_kind(k) sizeof(GFC_LOGICAL_ ## k)
+#define sizeof_integer_kind(k) sizeof(GFC_INTEGER_ ## k)
+#define sizeof_real_kind(k) sizeof(GFC_REAL_ ## k)
+#define sizeof_complex_kind(k) sizeof(GFC_COMPLEX_ ## k)
+
#ifndef GFC_MAX_DIMENSIONS
#define GFC_MAX_DIMENSIONS 7
#endif
> However, there is still some kind of issue with formatted input of
> very big real(10) numbers.
> But AFAICS that has to do with parsing and
> not with the padding issues that this patch tries to address, so I'll
> file a separate PR for that.
OK, could you Cc: me in that PR when you file it?
More information about the Fortran
mailing list