1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/* { dg-require-effective-target untyped_assembly } */
/* { dg-additional-options "-std=gnu89" } */
#define ID_1 2400000000.0
#define ID_2 1.7
#define ID_3 -1.7
unsigned ui;
int si;
conv_i1 ()
{
/*
ui = (unsigned) ID_1;
si = (int) ID_1;
*/
}
conv_i2 ()
{
ui = (unsigned) ID_2;
si = (int) ID_2;
}
conv_i3 ()
{
/* ui = (unsigned) ID_3;*/
si = (int) ID_3;
}
conv_1 (d)
double d;
{
ui = (unsigned) d;
/*
si = (int) d;
*/
}
double
foo (u)
unsigned u;
{
return u;
}
main ()
{
printf ("%lf\n", foo (2400000000));
conv_i1 ();
printf ("%lf, %u, %d\n", ID_1, ui, si);
conv_i2 ();
printf ("%lf, %u, %d\n", ID_2, ui, si);
conv_i3 ();
printf ("%lf, %u, %d\n", ID_3, ui, si);
conv_1 (ID_1);
printf ("%lf, %u, %d\n", ID_1, ui, si);
conv_1 (ID_2);
printf ("%lf, %u, %d\n", ID_2, ui, si);
conv_1 (ID_3);
printf ("%lf, %u, %d\n", ID_3, ui, si);
}
|