blob: a0d6403a1b44096cdfc986cbcf89e0501cd93154 [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 Lattner102f5332003-01-13 00:56:37 +000010
11 ; cast sbyte to ...
12 cast sbyte 0 to sbyte
13 cast sbyte 4 to short
14 cast sbyte 4 to long
15 cast sbyte 4 to ulong
16 cast sbyte 4 to double
17
18 ; cast short to ...
19 cast short 0 to short
20 cast short 0 to long
21 cast short 0 to ulong
22 cast short 0 to double
23
24 ; cast int to ...
Chris Lattnera4c096d2002-12-15 07:55:43 +000025 cast int 6 to bool
Chris Lattner102f5332003-01-13 00:56:37 +000026 cast int 6 to short
27 cast int 0 to int
28 cast int 0 to long
29 cast int 0 to ulong
30 cast int 0 to double
31
32 ; cast uint to ...
33 cast uint 0 to long
34 cast uint 0 to ulong
35
36 ; cast long to ...
37 cast long 0 to sbyte
38 cast long 0 to ubyte
39 cast long 0 to short
40 cast long 0 to ushort
41 cast long 0 to int
42 cast long 0 to uint
43 cast long 0 to long
44 cast long 0 to ulong
45 cast long 0 to float
46 cast long 0 to double
47
48 ; cast float to ...
49 cast float 0.0 to float
50 cast float 0.0 to double
51
52 ; cast double to ...
53 cast double 0.0 to sbyte
54 cast double 0.0 to ubyte
55 cast double 0.0 to short
56 cast double 0.0 to ushort
57 cast double 0.0 to int
58 cast double 0.0 to uint
59 cast double 0.0 to long
60 ;cast double 0.0 to ulong
61 cast double 0.0 to float
62 cast double 0.0 to double
Chris Lattnera4c096d2002-12-15 07:55:43 +000063
64 ret int 0
65}