LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-div-1.c
blob73b75861166f40733d9768e9703664d51ee1a9ef
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -funsafe-math-optimizations -fdump-tree-gimple" } */
4 float f(float x)
6 return x/2 + x/3;
9 float g(float x)
11 return 2/x + 3/x;
14 float h(float x)
16 return x/2 - x/3;
19 float i(float x)
21 return 2/x - 3/x;
24 /* f and h should be turned into multiplications,
25 the divisions in g and i should be grouped together. */
27 /* { dg-final { scan-tree-dump-times " \\* " 2 "gimple" } } */
28 /* { dg-final { scan-tree-dump-times " / " 2 "gimple" } } */