mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 11:54:01 +08:00
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
This commit is contained in:
parent
d5e90cabae
commit
60c063faab
@ -1,3 +1,9 @@
|
||||
2009-04-09 Janne Blomqvist <jb@gcc.gnu.org>
|
||||
|
||||
PR libfortran/39665
|
||||
* io/io.h (st_parameter_dt): Add aligned attribute to u.p.value.
|
||||
* io/read.c (convert_real): Add note about alignment requirements.
|
||||
|
||||
2009-04-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* m4/cshift0.m4: Change copyright header to refer to version 3
|
||||
|
@ -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
|
||||
|
@ -126,8 +126,10 @@ max_value (int length, int signed_flag)
|
||||
|
||||
/* convert_real()-- Convert a character representation of a floating
|
||||
* point number to the machine number. Returns nonzero if there is a
|
||||
* range problem during conversion. TODO: handle not-a-numbers and
|
||||
* infinities. */
|
||||
* range problem during conversion. Note: many architectures
|
||||
* (e.g. IA-64, HP-PA) require that the storage pointed to by the dest
|
||||
* argument is properly aligned for the type in question. TODO:
|
||||
* handle not-a-numbers and infinities. */
|
||||
|
||||
int
|
||||
convert_real (st_parameter_dt *dtp, void *dest, const char *buffer, int length)
|
||||
|
Loading…
Reference in New Issue
Block a user