["David M. Gay" <dmg@research.bell-labs.com>] libI77 fmt uncleanliness
Dave Love
d.love@dl.ac.uk
Mon Sep 29 15:20:00 GMT 1997
Sorry, I forgot to pass this on concerning Richard Henderson's
complaint. Diffs for the official fix are @gnu in
~fortran/davel/g77-970917.diff.gz which will presumably go into libf2c
for the next g77 release.
------- Start of forwarded message -------
Message-Id: <199709222050.VAA08578@mserv1.dl.ac.uk>
From: "David M. Gay" <dmg@research.bell-labs.com>
Date: Mon, 22 Sep 1997 16:48:36 -0400
To: d.love@dl.ac.uk (Dave Love)
Subject: libI77 fmt uncleanliness
Sorry to be slow responding to your E-mail of 30 Aug.
I'm still processing E-mail that accumulated while I was away...
> Richard> I77's fmt.h defines struct syl as
> Richard> struct syl { int op, p1, p2, p3; }
>
> Richard> and then goes off and does things like
>
> Richard> *(char **)&sp->p2 = s + 1;
>
> Richard> which is broken for 64-bit hosts.
Actually, this works just fine on most 64-bit hosts, since
field p3 is never used when p2 is viewed as a char*, and
reasonable compilers 64-bit align entities that are a multiple
of 64 bits in length (meaning that p2 is correctly aligned for
viewing &p2 as a pointer). While I was away, someone reported
trouble with an unreasonable compiler (that did not 64-bit align
the relevant struct syl array), which convinced me to adjust
the syl data structure. The updated source is available now from
netlib. (On most systems, the updated source gives the same object
code as before, but the use of a union should make the intent clear,
and it serves to force 64-bit alignment on the unreasonable system
in question.)
-- dmg
------- End of forwarded message -------
More information about the Gcc-bugs
mailing list