LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / inline-8.c
blobdf4a64deff9cece4589efd48c968bd29289d29b8
1 /* Verify that we do not inline isnanf test info -ffast-math code but that we
2 do inline trivial functions across -Ofast boundary. */
3 /* { dg-do run } */
4 /* { dg-require-effective-target c99_runtime } */
5 /* { dg-options "-O2" } */
6 /* { dg-add-options c99_runtime } */
7 #include <math.h>
8 extern int isnanf (float);
9 /* Can't be inlined because isnanf will be optimized out. */
10 int
11 cmp (float a)
13 return isnanf (a);
15 /* Can be inlined. */
16 int
17 move (int a)
19 return a;
21 float a;
22 void
23 set ()
25 a=nan("");
27 float b;
28 __attribute__ ((optimize("Ofast")))
29 int
30 main()
32 b++;
33 if (cmp(a))
34 __builtin_abort ();
35 float a = move (1);
36 if (!__builtin_constant_p (a))
37 __builtin_abort ();
38 return 0;