blob: 21270a361dc7e9d167427f3fcb8e7b27aeac8278 [file] [log] [blame]
Chris Lattnera4c096d2002-12-15 07:55:43 +00001
Chris Lattner102f5332003-01-13 00:56:37 +00002int %foo() {
3 ret int 0
4}
5
Chris Lattnera4c096d2002-12-15 07:55:43 +00006int %main() {
Chris Lattner102f5332003-01-13 00:56:37 +00007 ; cast bool to ...
8 cast bool true to bool
Chris Lattnera4c096d2002-12-15 07:55:43 +00009 cast bool true to int
Chris Lattner20c1b4d2003-01-16 19:43:11 +000010 cast bool true to long
11 cast bool true to ulong
12 cast bool true to float
13 cast bool true to double
Chris Lattner102f5332003-01-13 00:56:37 +000014
15 ; cast sbyte to ...
16 cast sbyte 0 to sbyte
17 cast sbyte 4 to short
18 cast sbyte 4 to long
19 cast sbyte 4 to ulong
20 cast sbyte 4 to double
21
22 ; cast short to ...
23 cast short 0 to short
24 cast short 0 to long
25 cast short 0 to ulong
26 cast short 0 to double
27
28 ; cast int to ...
Chris Lattnera4c096d2002-12-15 07:55:43 +000029 cast int 6 to bool
Chris Lattner102f5332003-01-13 00:56:37 +000030 cast int 6 to short
31 cast int 0 to int
32 cast int 0 to long
33 cast int 0 to ulong
34 cast int 0 to double
35
36 ; cast uint to ...
37 cast uint 0 to long
38 cast uint 0 to ulong
39
40 ; cast long to ...
41 cast long 0 to sbyte
42 cast long 0 to ubyte
43 cast long 0 to short
44 cast long 0 to ushort
45 cast long 0 to int
46 cast long 0 to uint
47 cast long 0 to long
48 cast long 0 to ulong
49 cast long 0 to float
50 cast long 0 to double
51
52 ; cast float to ...
Chris Lattner20c1b4d2003-01-16 19:43:11 +000053 ;cast float 0.0 to bool
Chris Lattner102f5332003-01-13 00:56:37 +000054 cast float 0.0 to float
55 cast float 0.0 to double
56
57 ; cast double to ...
Chris Lattner20c1b4d2003-01-16 19:43:11 +000058 ;cast double 0.0 to bool
Chris Lattner102f5332003-01-13 00:56:37 +000059 cast double 0.0 to sbyte
60 cast double 0.0 to ubyte
61 cast double 0.0 to short
62 cast double 0.0 to ushort
63 cast double 0.0 to int
64 cast double 0.0 to uint
65 cast double 0.0 to long
66 ;cast double 0.0 to ulong
67 cast double 0.0 to float
68 cast double 0.0 to double
Chris Lattnera4c096d2002-12-15 07:55:43 +000069
70 ret int 0
71}