Steve Underwood wrote:
Hi,
There seems to be a bug in the support for GCC 3.2.3 when a structure is
over 127 bytes. Depending what the source code looks like, it might do
the right thing, or it might go crazy. The attached test.c file compiles
OK if "GOOD_VERSION" is defined, otherwise it produces bad code. The two
results, compiled with -O2, are in test.result. If I play around with
the source code I can get different errors, like the registers being
mixed up and overwritten.
With structures up to 126 bytes I have not seen any similar problems.
I had noticed some time ago that using structures with an index that is
8 bits not 16 caused some strange problems with structures that were
large (bigger than the 8 bit index could calculate).
The compiler does not seem to cast the index to 16 bits when doing the
offset calculation.
It does not help, but yes I think its a compiler problem thats been
there for a while (in 3.2.3).
Regards,
--
Peter Jansen
STS
Australian Antarctic Division
Channel Highway
Kingston
TAS 7050
AUSTRALIA
Ph (03) 62 323 533
Fax (03) 62 323 351