diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2009-04-09 20:44:23 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2009-04-09 20:44:23 +0300 |
commit | 60c063faab4ddaec9129430d27524572d4549a24 (patch) | |
tree | 0c969a24443ac4004b44a4238a2e03514a8eb292 /libgfortran/io/io.h | |
parent | d5e90cabae9cc024a575908f141db044366ba384 (diff) | |
download | gcc-60c063faab4ddaec9129430d27524572d4549a24.zip gcc-60c063faab4ddaec9129430d27524572d4549a24.tar.gz gcc-60c063faab4ddaec9129430d27524572d4549a24.tar.bz2 |
re PR libfortran/39665 (Fortran IO using unaligned accesses to read/write doubles.)
2009-04-09 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/39665
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
* io/read.c (convert_real): Add note about alignment requirements.
From-SVN: r145852
Diffstat (limited to 'libgfortran/io/io.h')
-rw-r--r-- | libgfortran/io/io.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libgfortran/io/io.h b/libgfortran/io/io.h index 02b14ce..5ee0979 100644 --- a/libgfortran/io/io.h +++ b/libgfortran/io/io.h @@ -498,10 +498,11 @@ typedef struct st_parameter_dt /* A flag used to identify when a non-standard expanded namelist read has occurred. */ int expanded_read; - /* Storage area for values except for strings. Must be large - enough to hold a complex value (two reals) of the largest - kind. */ - char value[32]; + /* Storage area for values except for strings. Must be + large enough to hold a complex value (two reals) of the + largest kind. It must also be sufficiently aligned for + assigning any type we use into it. */ + char value[32] __attribute__ ((aligned (__BIGGEST_ALIGNMENT__))); GFC_IO_INT size_used; } p; /* This pad size must be equal to the pad_size declared in |