Sure enough, it's a compiler bug. I recompiled lib with -O0 and the problem is gone now. The debian package for my gcc is: ii gcc-3.3 3.3.3-9 The GNU C compiler -- Martin