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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Source has

__attribute__((__noipa__))
void BUF_reverse (unsigned char *out, const unsigned char *in, size_t size)
{
  size_t i;
  if (in)
    {
      out += size - 1;
      for (i = 0; i < size; i++)
        *out-- = *in++;
    }
  else

We generate

BUF_reverse:
.LFB0:
        .cfi_startproc
        movq    %rdi, %r8
        movq    %rsi, %rcx
        movq    %rdx, %rax
        testq   %rdx, %rdx   <<< RDX has size, not in.
        je      .L28

Reply via email to