aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr107389.c
blob: deb633807044828ff31710dfead76709c84b8b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-fdump-tree-optimized-alias" } */

unsigned foo (void *p)
{
  unsigned i;
  __builtin_memcpy (&i, __builtin_assume_aligned (p, 4), sizeof (unsigned));
  return i;
}

/* Even when not optimizing we should have alignment info on the temporary
   feeding the memcpy.  */
/* { dg-final { scan-tree-dump "ALIGN = 4" "optimized" } } */