1 typedef unsigned int uint
;
2 typedef unsigned long ulong
;
4 static int uint_2_int(void) { return (int)123U; }
5 static int long_2_int(void) { return (int)123L; }
6 static int ulong_2_int(void) { return (int)123UL; }
7 static int vptr_2_int(void) { return (int)((void*)123); }
8 static int iptr_2_int(void) { return (int)((int*)128); }
9 static int float_2_int(void) { return (int)1.123F
; }
10 static int double_2_int(void) { return (int)1.123L; }
11 static uint
int_2_uint(void) { return (uint
)123; }
12 static uint
long_2_uint(void) { return (uint
)123L; }
13 static uint
ulong_2_uint(void) { return (uint
)123UL; }
14 static uint
vptr_2_uint(void) { return (uint
)((void*)123); }
15 static uint
iptr_2_uint(void) { return (uint
)((int*)128); }
16 static uint
float_2_uint(void) { return (uint
)1.123F
; }
17 static uint
double_2_uint(void) { return (uint
)1.123L; }
18 static long int_2_long(void) { return (long)123; }
19 static long uint_2_long(void) { return (long)123U; }
20 static long ulong_2_long(void) { return (long)123UL; }
21 static long vptr_2_long(void) { return (long)((void*)123); }
22 static long iptr_2_long(void) { return (long)((int*)128); }
23 static long float_2_long(void) { return (long)1.123F
; }
24 static long double_2_long(void) { return (long)1.123L; }
25 static ulong
int_2_ulong(void) { return (ulong
)123; }
26 static ulong
uint_2_ulong(void) { return (ulong
)123U; }
27 static ulong
long_2_ulong(void) { return (ulong
)123L; }
28 static ulong
vptr_2_ulong(void) { return (ulong
)((void*)123); }
29 static ulong
iptr_2_ulong(void) { return (ulong
)((int*)128); }
30 static ulong
float_2_ulong(void) { return (ulong
)1.123F
; }
31 static ulong
double_2_ulong(void) { return (ulong
)1.123L; }
32 static void * int_2_vptr(void) { return (void *)123; }
33 static void * uint_2_vptr(void) { return (void *)123U; }
34 static void * long_2_vptr(void) { return (void *)123L; }
35 static void * ulong_2_vptr(void) { return (void *)123UL; }
36 static void * iptr_2_vptr(void) { return (void *)((int*)128); }
37 static int * int_2_iptr(void) { return (int *)123; }
38 static int * uint_2_iptr(void) { return (int *)123U; }
39 static int * long_2_iptr(void) { return (int *)123L; }
40 static int * ulong_2_iptr(void) { return (int *)123UL; }
41 static int * vptr_2_iptr(void) { return (int *)((void*)123); }
42 static float int_2_float(void) { return (float)123; }
43 static float uint_2_float(void) { return (float)123U; }
44 static float long_2_float(void) { return (float)123L; }
45 static float ulong_2_float(void) { return (float)123UL; }
46 static float double_2_float(void) { return (float)1.123L; }
47 static double int_2_double(void) { return (double)123; }
48 static double uint_2_double(void) { return (double)123U; }
49 static double long_2_double(void) { return (double)123L; }
50 static double ulong_2_double(void) { return (double)123UL; }
51 static double float_2_double(void) { return (double)1.123F
; }
54 * check-name: cast-constants.c
55 * check-command: test-linearize -m64 $file
289 set.32 %r39 <- 123.000000
296 set.32 %r41 <- 123.000000
303 set.32 %r43 <- 123.000000
310 set.32 %r45 <- 123.000000
317 set.32 %r47 <- 1.123000
324 set.64 %r49 <- 123.000000
331 set.64 %r51 <- 123.000000
338 set.64 %r53 <- 123.000000
345 set.64 %r55 <- 123.000000
352 set.64 %r57 <- 1.123000