llvm.org GIT mirror llvm / 3a386d4
Regression test for PR#330. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13399 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 16 years ago
2 changed file(s) with 69 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as -f < %s > %t1.bc
1 ; RUN: llvm-as -f < `dirname %s`/2004-05-07-TypeResolution2.ll > %t2.bc
2 ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc
3
4 target endian = little
5 target pointersize = 32
6
7 %myint = type opaque
8 %struct2 = type { %struct1 }
9
10 %struct1 = type { int, void (%struct2*)*, %myint *, int (uint *)* }
11
12
13 %driver1 = global %struct1 zeroinitializer ; <%struct1*> [#uses=1]
14
15 %m1 = external global [1 x sbyte] * ; <%struct.task_struct**> [#uses=0]
16 ;%m1 = external global uint ; <%struct.task_struct**> [#uses=0]
17 %str1 = constant [1 x ubyte] zeroinitializer
18 %str2 = constant [2 x ubyte] zeroinitializer
19 %str3 = constant [3 x ubyte] zeroinitializer
20 %str4 = constant [4 x ubyte] zeroinitializer
21 %str5 = constant [5 x ubyte] zeroinitializer
22 %str6 = constant [6 x ubyte] zeroinitializer
23 %str7 = constant [7 x ubyte] zeroinitializer
24 %str8 = constant [8 x ubyte] zeroinitializer
25 %str9 = constant [9 x ubyte] zeroinitializer
26 %stra = constant [10 x ubyte] zeroinitializer
27 %strb = constant [11 x ubyte] zeroinitializer
28 %strc = constant [12 x ubyte] zeroinitializer
29 %strd = constant [13 x ubyte] zeroinitializer
30 %stre = constant [14 x ubyte] zeroinitializer
31 %strf = constant [15 x ubyte] zeroinitializer
32 %strg = constant [16 x ubyte] zeroinitializer
33 %strh = constant [17 x ubyte] zeroinitializer
34
35 implementation ; Functions:
36
37 declare void %func(%struct2*)
38
39 void %tty_init() {
40 entry:
41 volatile store void (%struct2*)* %func, void (%struct2 *)** getelementptr (%struct1* %driver1, uint 0, uint 1)
42 ret void
43 }
0 ; This file is used by testlink1.ll, so it doesn't actually do anything itself
1 ;
2 ; RUN: echo
3
4 target endian = little
5 target pointersize = 32
6
7 %myint = type ushort
8 %struct2 = type { %struct1 }
9 %struct1 = type { int, void (%struct2*)*, %myint *, int (uint *)* }
10
11 implementation ; Functions:
12
13 internal void %f1 (%struct1* %tty) {
14 loopentry.preheader:
15
16 ; [#uses=1]
17 ; [#uses=0]
18
19 %tmp.2.i.i = getelementptr %struct1* %tty, uint 0, uint 1
20 %tmp.3.i.i = volatile load void (%struct2*)** %tmp.2.i.i
21
22 ret void
23 }
24