[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Greetings!  I seem to be consistently running up against the same
problem, so I thought I'd poll the collective intelligence of this

Typically, when writing an atlas kernel, I build a whole tree compiled
just with -g.  I get the kernel routines to the point that they pass
all tests (e.g. both x?mvtst and x?mv work), and then try to link in
the routines compiled with some optimization, say -g -O3. (i.e. I edit
the top level makefile and run make ?mvtstcase? mvrout=...).
Frequently, I get mislinked code.  When stepping through with a
debugger, the arguments (pointers usually) listed in the function
call are not correctly passed into the function.  A common case shows
two different arguments tied to the same value.

I think this has to do with inlining, as these are static functions,
and I think O3 and above (gcc) does inlining by default here.  OK, so
I just ran a test, now I *know* this is due to inlining, as -O6
-fno-inline-functions works.