Xref: utzoo gnu.gcc.bug:1652 gnu.g++.bug:1080 Path: utzoo!utgpu!watmath!uunet!samsung!brutus.cs.uiuc.edu!psuvax1!rutgers!boulder!ncar!asuvax!noao!amethyst!zeus.opt-sci.arizona.edu!mat From: mat@zeus.opt-sci.arizona.edu (Mat Watson) Newsgroups: gnu.gcc.bug,gnu.g++.bug Subject: Floating Point Bug Message-ID: <1176@amethyst.math.arizona.edu> Date: 10 Nov 89 03:03:52 GMT Sender: news@amethyst.math.arizona.edu Distribution: gnu Organization: Optical Sciences Center, Tucson, AZ Lines: 26 I'm writing to let you know about a rather bothersome C and C++ compiler bug that I've know about for the Sun cc compiler, and that I've noticed for gcc and g++ compilers as well. When Sun screwed up I thought: business as usual ;-), but now that I've noticed that FSF has the same kind of problem I feel that I must let you guys know whats up. Problem: when specifying a floating point processor in the compiler command the compiler does not use the floating point processor for the square root function ( this includes the Sun fpa board as well as the mc68881 ). This may be true for other functions also, but I have not tested these due to lack of time. Symptom: a gcc compiled program using the -m68881 flag runs about 40 times slower than the f77 compiled version using the -f68881 flag. The same is true for optimized g++ ( unoptimized g++ uses the 68881 and runs only about twice as slow as the f77 version ). Those of you who fix gcc and g++ please write me and I'll give you more detail. This includes: simple .f .c and .cc source, -v compiler output for various compiler / flag combinations, assembly language listings ( the smoking gun ), and run times for various versions. Mat Watson mat@zeus.opt-sci.arizona.edu [128.196.128.219] ..{allegra,cmcl2,hao!noao}!arizona!zeus.opt-sci.arizona.edu!mat Optical Sciences Center, Univ. of Arizona, Tucson, AZ 85721, USA