------- Comment #9 from ubizjak at gmail dot com 2007-06-22 12:26 ------- (In reply to comment #8)
> I'll work on some debugging and see if I can find out how it derives the value > of "i" that it prints differently each time. Don't worry, it works correctly. The non-problem you are going after is in printf(). It takes variable arguments from the stack and interprets them according to the format string. Argument are pushed to the stack by the caller without any other communication with callee, so it is obvious that format string _must_ reflect the type of values on stack. Also note, that %f inherently converts float type to double, so your values on the stack are FUBAR as far as printf is concerned. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32448