Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pragma_cpp_fma.c
blobc72ea8c73805cb7b6f968373986fc039fb1fc9bc
1 /* Test that FMA macro is correctly undef. */
2 /* { dg-do compile } */
3 /* { dg-skip-if "Default no fma" { *-*-* } { "-mfpu=*vfpv4*" "-mfpu=*armv8"} } */
4 /* { dg-require-effective-target arm_fp_ok } */
5 /* { dg-add-options arm_fp } */
7 /* Reset fpu to a value compatible with the next pragmas. */
8 #pragma GCC target ("fpu=vfp")
10 #pragma GCC push_options
11 #pragma GCC target ("fpu=crypto-neon-fp-armv8")
13 #ifndef __ARM_FEATURE_FMA
14 #error "__ARM_FEATURE_FMA is not defined but should be"
15 #endif
17 #ifndef __ARM_FEATURE_CRYPTO
18 #error "__ARM_FEATURE_CRYPTO is not defined but should be"
19 #endif
21 #if __ARM_NEON_FP != 6
22 #error "__ARM_NEON_FP"
23 #endif
25 #if __ARM_FP != 14
26 #error "__ARM_FP"
27 #endif
29 #pragma GCC pop_options
31 #pragma GCC push_options
32 #pragma GCC target ("fpu=neon-vfpv4")
33 #pragma GCC pop_options
35 #ifdef __ARM_FEATURE_FMA
36 #error "__ARM_FEATURE_FMA is defined but should not be"
37 #endif