[ARM] PR71607: Fix ICE when loading constant
[official-gcc.git] / gcc / testsuite / gcc.target / arm / thumb2-slow-flash-data-2.c
blob6e76043daeeab51bdac1052edc48502793cf4462
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cortex_m } */
3 /* { dg-require-effective-target arm_thumb2_ok } */
4 /* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" "-mcpu=cortex-m7" } } */
5 /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
6 /* { dg-options "-march=armv7e-m -mfloat-abi=hard -O2 -mthumb -mslow-flash-data" } */
8 float f (float);
10 const float max = 0.01f;
12 int
13 g (float in)
15 if (f (in) + f (in) < max)
16 return 0;
17 return 1;
20 double foo (void)
22 return 0xF1EC7A5239123AF;
25 double bar (void)
27 return 0.0f;