1 /* Copyright (C) 2007 Free Software Foundation.
3 Verify that nearbyint isn't transformed into e.g. rint or lrint
4 when -ftrapping-math is set.
6 Written by Kaveh ghazi, 2007-03-04. */
8 /* { dg-do compile } */
9 /* { dg-options "-ftrapping-math -fdump-tree-original" } */
10 /* { dg-add-options c99_runtime } */
12 #include "../builtins-config.h"
14 extern void bar (long);
16 #define TESTIT(FUNC) do { \
17 bar (__builtin_##FUNC(d)); \
18 bar (__builtin_##FUNC##f(f)); \
19 bar (__builtin_##FUNC##l(ld)); \
22 void __attribute__ ((__noinline__
)) foo (double d
, float f
, long double ld
)
33 /* { dg-final { scan-tree-dump-times "nearbyint " 1 "original" } } */
34 /* { dg-final { scan-tree-dump-times "nearbyintf" 1 "original" } } */
35 /* { dg-final { scan-tree-dump-times "nearbyintl" 1 "original" } } */