This is the mail archive of the gcc-bugs@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]

[Bug libfortran/41711] Z format does not support writing KIND=10 reals



------- Comment #1 from jvdelisle at gcc dot gnu dot org  2009-10-15 03:14 -------
Try this patch.  Does it give reasonable results?  Does endianess matter here?

Index: write.c
===================================================================
--- write.c     (revision 152697)
+++ write.c     (working copy)
@@ -392,9 +392,10 @@
       }
       break;
 #ifdef HAVE_GFC_INTEGER_16
+    case 10:
     case 16:
       {
-       GFC_INTEGER_16 tmp;
+       GFC_INTEGER_16 tmp = 0;
        memcpy ((void *) &tmp, p, len);
        i = tmp;
       }
@@ -446,9 +447,10 @@
       }
       break;
 #ifdef HAVE_GFC_INTEGER_16
+    case 10:
     case 16:
       {
-       GFC_INTEGER_16 tmp;
+       GFC_INTEGER_16 tmp = 0;
        memcpy ((void *) &tmp, p, len);
        i = (GFC_UINTEGER_16) tmp;
       }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41711


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