https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64919
--- Comment #9 from John Buddery <jvb at cyberscience dot com> --- I should clarify that the workaround above only works fully on 4.9.2 and earlier. >From 5.0 onwards, gcc seems to have a problem building 32 bit code for ia64-hpux. It doesn't emit intstructions to properly set the top two bits of pointers after widening, which is required because of the way ia64 segments it's address space. So, you might have better luck with 4.9.2. Or, you might be able to build gcc as a 64 bit executable (though I don't know how to do configure it this way).