Sebastian Redl wrote:
Anyway, just so I understand: the function is inline/static (don't know which of these causes the problem) which causes compareRanges to be exported, but not compiled position-independently. The linker, seeing that, fails. But with -O>1, it somehow doesn't actually export the function or something like that, and thus it works?
I didn't dig any deeper then what I have written already for icu as we have another test case provided in bug 151832. Basically gcc shouldn't inline the function or at least provide a callable symbol because its address is used later on (in the same file, even), which is what we found in the gcc documentation but not in the code ;)
So yes, it IS a toolchain-bug, but one the gcc-4.1 users share (gcc 3.4 works correctly apparently) :D
[1] http://bugs.gentoo.org/show_bug.cgi?id=151832 -- Kind Regards, Simon Stelling Gentoo/AMD64 developer -- [email protected] mailing list
