[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-convround-1.c
blob4d8bc61d550dd8eb399b519c38c475c6b5a53e7b
1 /* PR middle-end/28473. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-original" } */
5 extern double round(double);
6 extern double floor(double);
7 extern double ceil(double);
9 unsigned long long test1(double x)
11 return (unsigned long long) round(x);
14 unsigned long long test2(double x)
16 return (unsigned long long) floor(x);
18 unsigned long long test3(double x)
20 return (unsigned long long) ceil(x);
23 /* { dg-final { scan-tree-dump-times "__builtin_lround" 0 "original" } } */
24 /* { dg-final { scan-tree-dump-times "__builtin_llround" 0 "original" } } */
25 /* { dg-final { scan-tree-dump-times "__builtin_lfloor" 0 "original" } } */
26 /* { dg-final { scan-tree-dump-times "__builtin_llfloor" 0 "original" } } */
27 /* { dg-final { scan-tree-dump-times "__builtin_lceil" 0 "original" } } */
28 /* { dg-final { scan-tree-dump-times "__builtin_llceil" 0 "original" } } */