The ibits function works fine with integer kind 1 and 3 (default). When I needed to use kind=4, compilation fails. Error message 'Operand incompatible with opcode', which is not true. The code that the compiler has problem with is 'A = ibits(B(i),c,1)', where all are integers. B is an integer array.
When I tried other Fortran 95 compilers, it worked instantaneously. It appears that we got a bug here.