https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103028
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You should be able to hit this without -fharden-conditional-branches
Try something like:
unsigned char x;
int foo(void)
{
unsigned long long i = x;
i = i + 0x80000000;
unsigned long long t = 0xffffffff;
unsigned long long tt, ii;
asm("":"=g"(tt):"g"(t));
asm("":"=g"(ii):"g"(i));
if (i > t) {
if ((ii <= tt)) __builtin_trap();
return x;
} else if (!(ii <= tt)) __builtin_trap();
return 0;
}