Code generation error from gcc-2.96

Karl Günter Wünsch kgw@cswgmbh.de
Thu Oct 14 02:21:00 GMT 1999


Hello,

although I have reported this about two weeks ago, I decided to
reevaluate this problem again, this time with some additional
informations. It seems to me that in the cange from egcs-19990913 to
egcs-19990920 there was a bug introduced that generated wrong code on
x86-linux when not optimizing. At first I thought the problem was
centered around floating point precision but I did some further testing
that revealed the generated code for a register variable to be wrong.

Attached is the preprocessed input (only the function in question) and
the generated assembler output of said function. What happens is that
somewhere inside the loop the variable wh is clobbered and increases in
value for every time the loop is executed. I have narrowed the problem
down (on the assembler side of things) to the contents of %edi being
changed inside the loop. Maybe someone with some more experience in
x86-assembler can help here and help me track down the errornous
instruction. The only compiler flags used were -g -pg.

The same thing happens with all snapshots since egcs-19990920 including
the current egcs-19991014.

Unfortunately all of my attempts to generate an example of the same
error by boiling down my project to the relevant member functions etc
have immediately removed the error. The same happens if I only add a
single line of code that accesses the variable wh to the member
function.

If any other information are needed to track down this error then I will
provide them asap, but given that the project contains several thousand
lines of code and I have miserably failed to generate an extract of it
that still shows this error my hopes are that someone with some more
expertise in x86-assembler looks at the generated statements and can
pinpoint the position where %edi is clobbered inside the loop and which
insn of the x86 backend does so.

regards
Karl Günter Wünsch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: k1.tar.gz
Type: application/x-gzip
Size: 1381 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19991014/361ecd78/attachment.bin>


More information about the Gcc-bugs mailing list