Thanks everybody. I managed to install GCC 4.9 on 64-bit RHEL6 machine (from RedHat devtoolset-3). The compiler can build both 32-bit and 64-bit binaries and I can run both of them on the same system. This is exactly what I wanted. Cheers Alex