summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr48144.c
blob: 030202d064bb92e932d7379ad00994491624f714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
/* { dg-options "-O -frerun-cse-after-loop -fschedule-insns2 -fselective-scheduling2 -fno-tree-ch -funroll-loops --param=max-sched-extend-regions-iters=2 --param=max-sched-region-blocks=15" } */
extern void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);

void bar (void *, void *, void *);

void foo
  (void *p, char *data, unsigned data_len)
{
  int buffer[8];
  int buf2[8];
  unsigned i;
  for (i = 0; i + 8 <= data_len; i += 8)
    bar (p, buffer, data + i);
  memcpy (buf2, data + i, data_len);
}