1/* { dg-do compile } */ 2/* { dg-require-effective-target arm_unaligned } */ 3/* { dg-options "-O2" } */ 4 5#include <string.h> 6 7void unknown_alignment (char *dest, char *src) 8{ 9 memcpy (dest, src, 15); 10} 11 12/* We should see three unaligned word loads and store pairs, one unaligned 13 ldrh/strh pair, and an ldrb/strb pair. Sanity check that. */ 14 15/* { dg-final { scan-assembler-times "@ unaligned" 8 } } */ 16/* { dg-final { scan-assembler-times "ldrh" 1 } } */ 17/* { dg-final { scan-assembler-times "strh" 1 } } */ 18/* { dg-final { scan-assembler-times "ldrb" 1 } } */ 19/* { dg-final { scan-assembler-times "strb" 1 } } */ 20