problem with ia64_fetch_and_add
I'm having problem compiling code with macro function ia64_fetch_and_add.
What happens is if I use atomic_add_return() in one of the inline function, I'm getting unresolved symbol error at link time for __bad_increment_for_ia64_fetch_and_add(). But the input argument to ia64_fetch_and_add() is of constant 1 or -1. I'm using gcc-3.2.2.
Is this a toolchain problem? Just for the sake of compile, the same code compiled without error with gcc-2.96, which kind of give me a fuzzy feeling that gcc-3.2 is not working for this case. Has anyone seen this before?
- Ken
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kenneth W
Ken> I'm having problem compiling code with macro function Ken> ia64_fetch_and_add. What happens is if I use
Ken> atomic_add_return() in one of the inline function, I'm getting Ken> unresolved symbol error at link time for
Ken> __bad_increment_for_ia64_fetch_and_add(). But the input Ken> argument to ia64_fetch_and_add() is of constant 1 or -1. I'm Ken> using gcc-3.2.2.
Ken> Is this a toolchain problem? Just for the sake of compile, the Ken> same code compiled without error with gcc-2.96, which kind of Ken> give me a fuzzy feeling that gcc-3.2 is not working for this Ken> case. Has anyone seen this before?
That's normally an indication that you built with too low an optimization level (you need to use at least -O1).
--david