This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about symbols in object file and -ffast-math with optimization turned on


On Fri, Sep 26, 2003 at 11:47:08AM -0700, Myles Sussman wrote:
> I have a simple piece of code shown below
> ______________________________
> #include <math.h>
> 
> void core_c(float* numbers, int imax, float* results)
> {
>   int i;
>   for (i=0;i<imax;++i)
>     {
>       results[i] = exp(numbers[i]);
>     }
> }
> _____________________________
> 
> I compiled this with optimization and fast-math:
> 
> > gcc -ffast-math -O1 -c sample.c
> > nm sample.o
> 
> 00000000 T core_c
> 
> Notice I don't see the function "exp" in the symbol table!

That's because, with -ffast-math on the x86 architecture, inline
code is generated to compute exp.  To see the code, give the -S
option.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]