https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103028
--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> --- Andrew, asm("":"=g"(tt):"g"(t)); asm("":"=g"(ii):"g"(i)); Make it "0" for the inputs: asm("":"=g"(tt):"0"(t)); and AFAICT if you "detach" the immediate constant, you won't get the bug. The problem occurs because (leu (compare reg imm)...) is turned into (ltu (compare reg imm+1)...) for the trap_if, and then the immediate no longer fits in the compare.