Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pragma_arch_attribute_2.c
blob2e8e385774b004a8f04e281a0449ed977210b540
1 /* Test for target attribute assembly extension generations. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_arch_v8a_ok } */
4 /* { dg-add-options arm_arch_v8a } */
5 /* { dg-additional-options "-std=gnu99" } */
7 #include <stdint.h>
9 extern uint32_t bar();
11 __attribute__((target("arch=armv8-a+crc"))) uint32_t crc32cw(uint32_t crc, uint32_t val)
13 uint32_t res;
14 asm("crc32cw %0, %1, %2" : "=r"(res) : "r"(crc), "r"(val));
15 return res;
18 uint32_t restored ()
20 return bar();
23 /* { dg-final { scan-assembler-times {\.arch\s+armv8-a} 3 } } */
24 /* { dg-final { scan-assembler-times {\.arch_extension\s+crc} 1 } } */