miscompilation with current gcc on x86

Jeffrey A Law law@cygnus.com
Tue Mar 28 08:34:00 GMT 2000


  In message < m3ya7avf4k.fsf@localhost.localnet >you write:
  > The appended code compiled with the current gcc (this bugs exists for
  > at least a week now) produces strange results.  It's supposed to write
  > to stdout the string "Hello World " but it does not write anything.
  > 
  > The problem is that the inlined function `f' modifies the variable
  > `format' in function `bar'.  Therefore end - (const unsigned char *) format
  > in the `write' call leads to zero.  If you look at the code, the compiler
  > actually pushes the constant zero.
I believe this bug has been fixed in the development sources.

THanks,
jeff




More information about the Gcc-bugs mailing list