regtest: broaden none/tests/linux/bug498317 suppression for PPC
[valgrind.git] / none / tests / arm64 / bug489338.c
blob481d744643c5051e126a11204bf978fb9e3d7e3a
1 /*
2 cat fp-valgrind-test.c
3 gcc -g -O2 fp-valgrind-test.c -o fp-valgrind-test
4 ./fp-valgrind-test
5 valgrind ./fp-valgrind-test
6 gdb -q --args ./fp-valgrind-test
7 disassemble main
9 */
11 #include <stdio.h>
12 #include <math.h>
14 double value(int s)
16 switch (s) {
17 case 0: return -322.500001; break;
18 case 1: return -322.5; break;
19 case 2: return -322.499999; break;
20 case 3: return 322.499999; break;
21 case 4: return 322.5; break;
22 default: return 322.500001; break;
26 int main()
28 for (int i = 0; i < 6; i++) {
29 volatile double a = value(i);
30 int b = (int)round(a);
31 printf("i=%d a=%f a=0x%llx b=%d\n", i, a, *(long long unsigned int*)&a, b);