This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question about symbols in object file and -ffast-math with optimization turned on
- From: "Myles Sussman" <myles at luxtera dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 26 Sep 2003 11:47:08 -0700
- Subject: question about symbols in object file and -ffast-math with optimization turned on
- Organization: Luxtera, Inc
- Reply-to: <myles at luxtera dot com>
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!
Without OPTIMIZATION I see the symbol for exp in the symbol table, as is the
case when I compile without fast-math and just use optimization alone.
> gcc -ffast-math -c sample.c
> nm sample.o
00000000 T core_c
U exp
What happens "under the covers" when you use -ffast-math AND -O1?
Why is the symbol for exp missing in that case?
Any help would be greatly appreciated.
I am running gcc 3.2.2 under Red Hat Linux 9.