2 /* { dg-do run { target *-*-linux* *-*-gnu* } }
3 /* { dg-options "-O2 -frounding-math" } */
11 double a
[N
] = { 2.0, 2.25, 2.5, 2.75, 3.5, -2.0, -2.25, -2.5, -2.75, -3.5, 0x2.0p53
, -0x2.0p53
};
12 double b
[N
], c
[N
], d
[N
], e
[N
];
13 double be
[N
] = { 2.0, 2.0, 2.0, 3.0, 4.0, -2.0, -2.0, -2.0, -3.0, -4.0, 0x2.0p53
, -0x2.0p53
};
14 double ce
[N
] = { 2.0, 2.0, 2.0, 2.0, 3.0, -2.0, -3.0, -3.0, -3.0, -4.0, 0x2.0p53
, -0x2.0p53
};
15 double de
[N
] = { 2.0, 3.0, 3.0, 3.0, 4.0, -2.0, -2.0, -2.0, -2.0, -3.0, 0x2.0p53
, -0x2.0p53
};
16 double ee
[N
] = { 2.0, 2.0, 2.0, 2.0, 3.0, -2.0, -2.0, -2.0, -2.0, -3.0, 0x2.0p53
, -0x2.0p53
};
17 asm volatile ("" : : "g" (a
), "g" (be
), "g" (ce
), "g" (de
), "g" (ee
) : "memory");
20 fesetround (FE_TONEAREST
);
21 for (i
= 0; i
< N
; ++i
)
22 b
[i
] = __builtin_rint (a
[i
]);
23 fesetround (FE_DOWNWARD
);
24 for (i
= 0; i
< N
; ++i
)
25 c
[i
] = __builtin_rint (a
[i
]);
26 fesetround (FE_UPWARD
);
27 for (i
= 0; i
< N
; ++i
)
28 d
[i
] = __builtin_rint (a
[i
]);
29 fesetround (FE_TOWARDZERO
);
30 for (i
= 0; i
< N
; ++i
)
31 e
[i
] = __builtin_rint (a
[i
]);
32 fesetround (FE_TONEAREST
);
33 for (i
= 0; i
< N
; ++i
)
34 if (b
[i
] != be
[i
] || c
[i
] != ce
[i
] || d
[i
] != de
[i
] || e
[i
] != ee
[i
])