libstdc++: Make equal and is_permutation short-circuit (LWG 3560)
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / funcspec-9.c
blobb4a988a34fe3ebdf5371c933f7ae9c77a4f6ccb3
1 /* Test whether using target specific options, we can generate FMA4 code. */
2 /* { dg-do compile } */
3 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=k8" } } */
4 /* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
6 extern void exit (int);
8 #ifdef __FMA4__
9 #warning "__FMA4__ should not be defined before #pragma GCC target."
10 #endif
12 #pragma GCC push_options
13 #pragma GCC target ("fma4")
15 #ifndef __FMA4__
16 #warning "__FMA4__ should have be defined after #pragma GCC target."
17 #endif
19 float
20 flt_mul_add (float a, float b, float c)
22 return (a * b) + c;
25 #pragma GCC pop_options
26 #ifdef __FMA4__
27 #warning "__FMA4__ should not be defined after #pragma GCC pop target."
28 #endif
30 double
31 dbl_mul_add (double a, double b, double c)
33 return (a * b) + c;
36 /* { dg-final { scan-assembler "vfmaddss" } } */
37 /* { dg-final { scan-assembler "addsd" } } */