view gcc/testsuite/gcc.dg/tree-prof/pr47187.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR bootstrap/47187 */
/* { dg-options "-O2" } */

char buf[64];
char buf2[64];

void *
foo (char *p, long size)
{
  return __builtin_memcpy (buf, p, size);
}

int
main (void)
{
  long i;
  for (i = 0; i < 65536; i++)
    if (foo ("abcdefghijkl", 12) != buf)
      __builtin_abort ();
  if (foo (buf2, 64) != buf)
    __builtin_abort ();
  return 0;
}