Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / nios2 / custom-fp-5.c
blob1dba87a4e44adeb2f723c3dfd7c30f5334b0923d
1 /* Test that forward declaration and definition don't conflict when used
2 with pragma specification of custom instructions. */
4 /* { dg-do compile } */
5 /* { dg-options "-O1 -ffinite-math-only" } */
7 /* -O1 in the options is significant. Without it FP operations may not be
8 optimized to custom instructions. */
10 #include <stdio.h>
11 #include <math.h>
13 #pragma GCC target ("custom-fmaxs=246,custom-fmins=247")
15 extern void
16 custom_fp (float operand_a, float operand_b, float *result);
18 void
19 custom_fp (float operand_a, float operand_b, float *result)
21 result[0] = fmaxf (operand_a, operand_b);
22 result[1] = fminf (operand_a, operand_b);
25 /* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
26 /* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */