https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63541
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- pc is not general enough in all of armv7. If you want to read the PC do this instead or something like this: asm("mov pc, %0":"=r"arm_pc);