1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cortex_m } */
3 /* { dg-require-effective-target arm_thumb2_ok } */
4 /* { dg-require-effective-target arm_fp_ok } */
5 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
6 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
7 /* { dg-skip-if "-mslow-flash-data and -mword-relocations incompatible" { *-*-* } { "-mword-relocations" } } */
8 /* { dg-options "-march=armv7e-m+fp -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
9
10 float f (float);
11
12 const float max = 0.01f;
13
14 int
15 g (float in)
16 {
17 if (f (in) + f (in) < max)
18 return 0;
19 return 1;
20 }
21
22 double foo (void)
23 {
24 return 0xF1EC7A5239123AF;
25 }
26
27 double bar (void)
28 {
29 return 0.0f;
30 }