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

--- Comment #5 from Marat Zakirov <m.zakirov at samsung dot com> ---
Thank you for your quick response Jacub. Actually I take this issue from
existing ffmpeg source so the test is just a truncated version. 

Following fail in my 4.10 without discovered fix:

cat test.c

#define N   4
#define M   16

int main ()
{
  int  i = 1, j = 3;
  char ind[N][M];
  __builtin_memset( ind, 0, M * N);
  __asm ("\n"
           : "+m"(i), "+m"(j));
  __builtin_memcpy (ind[j], ind[i], M * 1);
  return 0;
}

gcc test.c -fsanitize=address -static-libasan 
./a.out

Reply via email to