public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/22519] New: Memory and binary disk layout disagree for real*10
@ 2005-07-17 13:58 schnetter at aei dot mpg dot de
  2005-07-17 15:47 ` [Bug fortran/22519] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-07-17 13:58 UTC (permalink / raw)
  To: gcc-bugs

The memory layout of a real*10 variable on an i386 processor requires 12 or 16 
bytes per variable, depending on the flag -m128bit-long-double.  The disk 
layout for unformatted (binary) writing occupies 10 bytes per variable. 
 
This has several disadvantages.  It is different from I would naively expect 
(which does not mean much), and it is different from binary C I/O (which could 
also be ignored).  However, it is likely also rather inefficient if large 
arrays are written to disk, because a single call to write() or fwrite() now 
has to be split up into one call per array element, so that the padding is 
removed. 
 
It is also questionable whether having a real*10 variable occupy 12 or 16 
bytes in memory is what people expect; again, this could be ignored since the 
standard permits this.  However, this is also very different from what other 
compilers do.

-- 
           Summary: Memory and binary disk layout disagree for real*10
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-03-14  1:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22519-7427@http.gcc.gnu.org/bugzilla/>
2005-10-03 10:36 ` [Bug fortran/22519] Memory and binary disk layout disagree for real*10 fxcoudert at gcc dot gnu dot org
2005-11-05 18:12 ` jblomqvi at cc dot hut dot fi
2006-02-14 16:27 ` fxcoudert at gcc dot gnu dot org
2006-03-04 16:02 ` jb at gcc dot gnu dot org
2006-03-14  1:21 ` pinskia at gcc dot gnu dot org
2005-07-17 13:58 [Bug fortran/22519] New: " schnetter at aei dot mpg dot de
2005-07-17 15:47 ` [Bug fortran/22519] " pinskia at gcc dot gnu dot org
2005-07-17 19:46 ` tkoenig at gcc dot gnu dot org
2005-07-17 19:49 ` tkoenig at gcc dot gnu dot org
2005-07-17 20:03 ` schnetter at uni-tuebingen dot de
2005-07-18 14:40 ` tkoenig at gcc dot gnu dot org
2005-08-16 20:04 ` tkoenig at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).