GNU gcc compiler bug?

Charlie Miller cmiller at hao.ucar.edu
Tue Nov 29 07:29:06 AEST 1988


Has anyone else noticed the following bug in the GNU gcc compiler? 
Of course, maybe there has been an installation error or some other
problem, anyway, when compiling a simple program like:
(compile command line: gcc -S test.c)

#include <math.h>
main()
{
double i;

	i = cos(.5);
}

the .s file looks like this:

#NO_APP
.globl fltused
.text
	.even
LC0:
	.double 0r0.5
	.even
.globl _main
_main:
	link a6,#-8
	movel LC0+4,sp at -
	movel LC0,sp at -
	jbsr _cos
	fmoved fp0,a6@(-8)
L1:
	unlk a6
	rts

As you can see, the compiler sets up for a software library call, makes the
call, then tries to get the result out of the M68881 floating point co-
processor.  I have just installed the gcc compiler, as a base for installing
g++.  The compiler version is 1.27.  I am using an Integrated Solutions
M68020/68881 based computer running UNIX bsd 4.3.  The gcc compiler seems
to work fine on other floating point operations like divide and multiply,
making use of the m68881. 

If anyone has seen this problem before or has any information please email
me.

Thanks.

===========================================================================
Some folks look for answers...
-Charles E. Miller      
USPS Mail:              High Altitude Observatory
			P.O. Box 3000
			Boulder CO  80307
Internet:               cmiller at hao.ucar.edu
UUCP:                   {arizona,decvax,ihnp4}!hao!cmiller
===========================================================================



More information about the Comp.sources.bugs mailing list