Max, thanks, Fixed... (libgcc.S:481 was wrong label)
Please update you gcc. ~d On Thu, 11 Jul 2002 18:43:22 -0700 Max Behensky <[email protected]> wrote: > > Hi, Dimitry- > I just found a bug in the divide routine. Under some conditions you get the > wrong answer. > > Here is an example: > > extern const unsigned long foo; > extern const unsigned long bar; > extern unsigned long baz; > > main() > { > baz = bar/foo; > } > > // Define these after you use them or the compiler will optimize the divide > away... > const unsigned long foo = 65535l; > const unsigned long bar = 6553500l; > unsigned long baz; > > If you run this program, baz gets 127, not 100 like it should. > > I have been looking at the code in libgcc.S, but I don't understand how the > divide routine works yet. I'll keep trying to figure out what is wrong.. > > Max > > > > > /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/
