Xref: news2.mv.net comp.os.msdos.djgpp:4433 From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: More buggy libm Date: Fri, 31 May 1996 14:21:39 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 44 Message-ID: <31AEF263.167E@LSTM.Ruhr-UNI-Bochum.De> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Investigating deeper into libm, I found paranoia, a program that checks the basic math performance of a compiler. This showed some interesting problems, which may be due to the optimizer. If I run the unmodified version of paranoia, gcc fails badly. Adding _control87(1372,0xffff); /* That what BC sets */ _control89(MCW_EM,MCW_EM); helps a bit: Optimization libm Result none no 1 flaw none yes 1 flaw (same as above) -O1 no hung -O1 yes hung -O2 no hung -O2 yes hung Keeping the default value of _control87() gives a stop in the middle of the program. I just cross-checked the program with gcc.2.6.3 on an R6000, that one passes all the tests. So, if anybody has an R6000 with 2.7.2 might try paranoia to see if it is a bug in the optimizer. And I would like to find a x86 compiler that passes the test. Neither TC2.0 nor BC3.1 passed.... Oh yes: Libm doesn't seem to change anything about the results so far, too bad. -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************