[gnu.gcc.bug] Floating Point Bug

mat@zeus.opt-sci.arizona.edu (Mat Watson) (11/10/89)

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