https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84780

--- Comment #10 from Zdenek Sojka <zsojka at seznam dot cz> ---
(In reply to Segher Boessenkool from comment #8)
> Created attachment 43631 [details]
> proposed patch
> 
> I cannot reproduce that exact generated code; maybe it needs tuning for some
> particular CPU?
> 
> Could you try the attached patch?  Thanks!

This is causing segfault:

$ cat testcase.c 
int a, d;
long b;
__int128 c;
void foo(void)
{
  a &= 0 < b;
  do {
    c = b >>= 63;
    c -= __builtin_add_overflow_p(0, b, d);
  } while (a >= 255);
}

$ aarch64-unknown-linux-gnu-gcc -Og testcase.c
during RTL pass: combine
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: Segmentation fault
 }
 ^
0xc927bf crash_signal
        /repo/gcc-trunk/gcc/toplev.c:325
0xc11391 reg_used_between_p(rtx_def const*, rtx_insn const*, rtx_insn const*)
        /repo/gcc-trunk/gcc/rtlanal.c:1128
0x13c1486 can_combine_p
        /repo/gcc-trunk/gcc/combine.c:1993
...

Reply via email to