Added RUN lines and dejagnu support for Feature dir.
[oota-llvm.git] / test / Feature / opaquetypes.ll
1 ; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5 ; This test case is used to test opaque type processing, forward references,
6 ; and recursive types.  Oh my.
7
8
9 %SQ1 = type { int }
10 %ITy = type opaque
11 %SQ2 = type { %ITy }
12 %ITy = type int
13
14
15 %CCC = type { \2* }
16 %BBB = type { \2*, \2 * }
17 %AAA = type { \2*, {\2*}, [12x{\2*}], {[1x{\2*}]} }
18
19 ; Test numbered types
20 type %CCC
21 type %BBB
22 %Composite = type { %0, %1 }
23
24 ; Test simple opaque type resolution...
25 %intty = type opaque
26 %intty = type int
27
28 ; Perform a simple forward reference...
29 %ty1 = type { %ty2, int }
30 %ty2 = type float
31
32 ; Do a recursive type...
33 %list = type { %list * }
34 %listp = type { %listp } *
35
36 ; Do two mutually recursive types...
37 %TyA = type { %ty2, %TyB * }
38 %TyB = type { double, %TyA * }
39
40 ; A complex recursive type...
41 %Y = type { {%Y*}, %Y* }
42 %Z = type { { %Z * }, [12x%Z] *, {{{ %Z * }}} }
43
44 ; More ridiculous test cases...
45 %A = type [ 123x %A*]
46 %M = type %M (%M, %M) *
47 %P = type %P*
48
49 ; Recursive ptrs
50 %u = type %v*
51 %v = type %u*
52
53 ; Test the parser for unnamed recursive types...
54 %P1 = type \1 *
55 %Y1 = type { { \3 * }, \2 * }
56 %Z1 = type { { \3 * }, [12x\3] *, { { { \5 * } } } }
57
58 implementation
59
60
61