[ARM] Fix test armv8_2-fp16-move-1.c
[official-gcc.git] / gcc / testsuite / gcc.target / arm / attr-unaligned-load-ice.c
blobe1ed1c148e007c152275996568892d86320bb18b
1 /* PR target/68617
2 Verify that unaligned_access is correctly with attribute target. */
3 /* { dg-do compile } */
4 /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
5 /* { dg-options "-Os -mfloat-abi=softfp -mtp=soft" } */
6 /* { dg-add-options arm_arch_v6 } */
8 long __attribute__((target("thumb")))
9 foo (char *s, long size, int unsigned_p)
11 long x;
12 unsigned char *p = (unsigned char *) s;
13 switch (size)
15 case 4:
16 x = ((long) p[3] << 24) | ((long) p[2] << 16) | (p[1] << 8) | p[0];
17 return x;