The best unbreakage yet, addressing Bill's concerns.
[oota-llvm.git] / test / Linker / 2004-05-07-TypeResolution1.ll
1 ; RUN: llvm-as -f < %s > %t1.bc
2 ; RUN: llvm-as -f < `dirname %s`/2004-05-07-TypeResolution2.ll > %t2.bc
3 ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc
4
5 target endian = little
6 target pointersize = 32
7
8   %myint = type opaque
9         %struct2 = type { %struct1 }
10
11         %struct1 = type { int, void (%struct2*)*,  %myint *, int (uint *)* }
12
13
14 %driver1 = global %struct1 zeroinitializer              ; <%struct1*> [#uses=1]
15
16 %m1 = external global [1 x sbyte] *     ; <%struct.task_struct**> [#uses=0]
17 ;%m1 = external global uint     ; <%struct.task_struct**> [#uses=0]
18 %str1 = constant [1 x ubyte] zeroinitializer
19 %str2 = constant [2 x ubyte] zeroinitializer
20 %str3 = constant [3 x ubyte] zeroinitializer
21 %str4 = constant [4 x ubyte] zeroinitializer
22 %str5 = constant [5 x ubyte] zeroinitializer
23 %str6 = constant [6 x ubyte] zeroinitializer
24 %str7 = constant [7 x ubyte] zeroinitializer
25 %str8 = constant [8 x ubyte] zeroinitializer
26 %str9 = constant [9 x ubyte] zeroinitializer
27 %stra = constant [10 x ubyte] zeroinitializer
28 %strb = constant [11 x ubyte] zeroinitializer
29 %strc = constant [12 x ubyte] zeroinitializer
30 %strd = constant [13 x ubyte] zeroinitializer
31 %stre = constant [14 x ubyte] zeroinitializer
32 %strf = constant [15 x ubyte] zeroinitializer
33 %strg = constant [16 x ubyte] zeroinitializer
34 %strh = constant [17 x ubyte] zeroinitializer
35
36 implementation   ; Functions:
37
38 declare void %func(%struct2*)
39
40 void %tty_init() {
41 entry:
42         volatile store void (%struct2*)* %func, void (%struct2 *)** getelementptr (%struct1*  %driver1, uint 0, uint 1)
43         ret void
44 }