This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/41711] Z format does not support writing KIND=10 reals
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Oct 2009 03:14:26 -0000
- Subject: [Bug libfortran/41711] Z format does not support writing KIND=10 reals
- References: <bug-41711-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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