egcs-1.1: fix for volatile bug
Tue Jan 12 02:10:00 GMT 1999
On Mon, 11 Jan 1999, Mark Powell wrote:
> The following bug was observed in egcs-1.1b and egcs-1.1.1 configured
> for m68k-coff.
> Assignment operations through a pointer variable declared volatile
> produce multiple accesses. This can cause incorrect behaviour when the
> destination of the write is a register in a peripheral device and the
> device expects a series of values to be written to the same address.
> The bug is triggered when compiling with no optimisation. Optimisation
> levels of -O1 and above do not exhibit the bug.
For info, the bug is fixed in current snapshots.
The fix was well commented so I was able to narrow it down very quickly.
A patch for egcs-1.1.1 is attached. It should apply to egcs-1.1b
Mark Powell, Senior Software Engineer, Primagraphics Limited
New Cambridge House, Litlington, nr.Royston, Herts, SG8 0SS, UK
Tel. +44 1763 852222, Fax. 853324, firstname.lastname@example.org, http://www.primag.co.uk
More information about the crossgcc