2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / arm / pragma_fpu_attribute_2.c
blobadd40ddc6b8a8645023784e9a29ea547c613698d
1 /* Test for #pragma assembly extension generations. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_fp_ok } */
4 /* { dg-add-options arm_fp } */
6 #include <stdint.h>
8 #pragma GCC target("fpu=vfpv3-d16")
10 extern uint32_t bar();
12 #pragma GCC push_options
13 #pragma GCC target("fpu=vfpv4")
14 extern float fmaf (float, float, float);
16 float
17 vfma32 (float x, float y, float z)
19 return fmaf (x, y, z);
21 #pragma GCC pop_options
23 uint32_t restored ()
25 return bar();
28 /* { dg-final { scan-assembler-times {\.fpu\s+vfpv4} 1 } } */
29 /* { dg-final { scan-assembler-times {\.fpu\s+vfpv3-d16} 1 } } */