Merging r259346 (with adjustments for r258867):
[oota-llvm.git] / test / Bitcode / pr18704.ll
1 ; RUN:  not llvm-dis < %s.bc 2>&1 | FileCheck %s
2
3 ; CHECK: llvm-dis{{(\.EXE|\.exe)?}}: error: Never resolved value found in function
4
5 ; pr18704.ll.bc has an instruction referring to invalid type.
6 ; The test checks that LLVM reports the error and doesn't access freed memory
7 ; in doing so.
8
9 ;<MODULE_BLOCK NumWords=217 BlockCodeSize=3>
10 ;  <VERSION op0=1/>
11 ;  <BLOCKINFO_BLOCK/>
12 ;  <TYPE_BLOCK_ID NumWords=23 BlockCodeSize=4>
13 ;    <NUMENTRY op0=25/>
14 ;    <INTEGER op0=8/>
15 ;    <POINTER abbrevid=4 op0=0 op1=0/>
16 ;    <POINTER abbrevid=4 op0=1 op1=0/>
17 ;    <ARRAY abbrevid=9 op0=6 op1=0/>
18 ;    <POINTER abbrevid=4 op0=3 op1=0/>
19 ;    <ARRAY abbrevid=9 op0=10 op1=0/>
20 ;    <POINTER abbrevid=4 op0=5 op1=0/>
21 ;    <ARRAY abbrevid=9 op0=4 op1=0/>
22 ;    <POINTER abbrevid=4 op0=7 op1=0/>
23 ;    <ARRAY abbrevid=9 op0=5 op1=0/>
24 ;    <POINTER abbrevid=4 op0=9 op1=0/>
25 ;    <STRUCT_NAME abbrevid=7 op0=115 op1=116 op2=114 op3=117 op4=99 op5=116 op6=46 op7=112 op8=97 op9=105 op10=114 op11=46 op12=48/>
26 ;    <STRUCT_NAMED abbrevid=8 op0=0 op1=1 op2=1/>
27 ;    <ARRAY abbrevid=9 op0=2 op1=11/>
28 ;    <POINTER abbrevid=4 op0=12 op1=0/>
29 ;    <FUNCTION abbrevid=5 op0=0 op1=1 op2=1 op3=1/>
30 ;    <POINTER abbrevid=4 op0=14 op1=0/>
31 ;    <FUNCTION abbrevid=5 op0=0 op1=1 op2=1/>
32 ;    <POINTER abbrevid=4 op0=16 op1=0/>
33 ;    <INTEGER op0=64/>
34 ;    <FUNCTION abbrevid=5 op0=0 op1=1 op2=18/>
35 ;    <POINTER abbrevid=4 op0=19 op1=0/>
36 ;    <INTEGER op0=32/>
37 ;    <FUNCTION abbrevid=5 op0=0 op1=21/>
38 ;    <POINTER abbrevid=4 op0=22 op1=0/>
39 ;    <VOID/>
40 ;  </TYPE_BLOCK_ID>
41 ;  <GLOBALVAR abbrevid=4 op0=2 op1=0 op2=0 op3=0 op4=0 op5=0/>
42 ;  <GLOBALVAR abbrevid=4 op0=2 op1=0 op2=0 op3=0 op4=0 op5=0/>
43 ;  <GLOBALVAR abbrevid=4 op0=2 op1=0 op2=0 op3=0 op4=0 op5=0/>
44 ;  <GLOBALVAR op0=4 op1=1 op2=25 op3=9 op4=0 op5=0 op6=0 op7=0 op8=1 op9=0/>
45 ;  <GLOBALVAR op0=6 op1=1 op2=26 op3=9 op4=0 op5=0 op6=0 op7=0 op8=1 op9=0/>
46 ;  <GLOBALVAR op0=8 op1=1 op2=27 op3=9 op4=0 op5=0 op6=0 op7=0 op8=1 op9=0/>
47 ;  <GLOBALVAR abbrevid=4 op0=10 op1=1 op2=28 op3=3 op4=0 op5=0/>
48 ;  <GLOBALVAR abbrevid=4 op0=6 op1=1 op2=26 op3=3 op4=0 op5=0/>
49 ;  <GLOBALVAR abbrevid=4 op0=13 op1=1 op2=31 op3=3 op4=0 op5=0/>
50 ;  <GLOBALVAR abbrevid=4 op0=2 op1=1 op2=23 op3=3 op4=0 op5=0/>
51 ;  <GLOBALVAR abbrevid=4 op0=2 op1=0 op2=24 op3=0 op4=0 op5=0/>
52 ;  <GLOBALVAR op0=10 op1=1 op2=28 op3=9 op4=0 op5=0 op6=0 op7=0 op8=1 op9=0/>
53 ;  <FUNCTION op0=15 op1=0 op2=1 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
54 ;  <FUNCTION op0=17 op1=0 op2=1 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
55 ;  <FUNCTION op0=20 op1=0 op2=1 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
56 ;  <FUNCTION op0=15 op1=0 op2=0 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
57 ;  <FUNCTION op0=17 op1=0 op2=0 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
58 ;  <FUNCTION op0=23 op1=0 op2=0 op3=0 op4=0 op5=0 op6=0 op7=0 op8=0 op9=0/>
59 ;  <CONSTANTS_BLOCK NumWords=20 BlockCodeSize=4>
60 ;    <SETTYPE abbrevid=4 op0=21/>
61 ;    <NULL/>
62 ;    <SETTYPE abbrevid=4 op0=1/>
63 ;    <CE_CAST abbrevid=6 op0=11 op1=17 op2=16/>
64 ;    <CE_INBOUNDS_GEP op0=6 op1=7 op2=21 op3=18 op4=21 op5=18/>
65 ;    <CE_CAST abbrevid=6 op0=11 op1=15 op2=15/>
66 ;    <CE_CAST abbrevid=6 op0=11 op1=13 op2=8/>
67 ;    <CE_CAST abbrevid=6 op0=11 op1=2 op2=9/>
68 ;    <SETTYPE abbrevid=4 op0=3/>
69 ;    <CSTRING abbrevid=11 op0=112 op1=114 op2=105 op3=110 op4=116/>
70 ;    <SETTYPE abbrevid=4 op0=5/>
71 ;    <CSTRING abbrevid=11 op0=115 op1=97 op2=121 op3=72 op4=105 op5=87 op6=105 op7=116 op8=104/>
72 ;    <SETTYPE abbrevid=4 op0=7/>
73 ;    <CSTRING abbrevid=11 op0=110 op1=101 op2=119/>
74 ;    <SETTYPE abbrevid=4 op0=9/>
75 ;    <CSTRING abbrevid=11 op0=109 op1=97 op2=105 op3=110/>
76 ;    <SETTYPE abbrevid=4 op0=11/>
77 ;    <AGGREGATE abbrevid=8 op0=31 op1=19/>
78 ;    <AGGREGATE abbrevid=8 op0=20 op1=21/>
79 ;    <SETTYPE abbrevid=4 op0=12/>
80 ;    <AGGREGATE abbrevid=8 op0=28 op1=29/>
81 ;    <SETTYPE abbrevid=4 op0=1/>
82 ;    <CE_INBOUNDS_GEP op0=10 op1=6 op2=21 op3=18 op4=21 op5=18/>
83 ;  </CONSTANTS_BLOCK>
84 ;  <METADATA_BLOCK NumWords=23 BlockCodeSize=3>
85 ;    <METADATA_KIND op0=0 op1=100 op2=98 op3=103/>
86 ;    <METADATA_KIND op0=1 op1=116 op2=98 op3=97 op4=97/>
87 ;    <METADATA_KIND op0=2 op1=112 op2=114 op3=111 op4=102/>
88 ;    <METADATA_KIND op0=3 op1=102 op2=112 op3=109 op4=97 op5=116 op6=104/>
89 ;    <METADATA_KIND op0=4 op1=114 op2=97 op3=110 op4=103 op5=101/>
90 ;    <METADATA_KIND op0=5 op1=116 op2=98 op3=97 op4=97 op5=46 op6=115 op7=116 op8=114 op9=117 op10=99 op11=116/>
91 ;    <METADATA_KIND op0=6 op1=105 op2=110 op3=118 op4=97 op5=114 op6=105 op7=97 op8=110 op9=116 op10=46 op11=108 op12=111 op13=97 op14=100/>
92 ;  </METADATA_BLOCK>
93 ;  <VALUE_SYMTAB NumWords=29 BlockCodeSize=4>
94 ;    <ENTRY abbrevid=6 op0=16 op1=101 op2=120 op3=97 op4=109 op5=112 op6=108 op7=101 op8=95 op9=109 op10=97 op11=105 op12=110/>
95 ;    <ENTRY abbrevid=6 op0=1 op1=99 op2=111 op3=110 op4=115 op5=111 op6=108 op7=101/>
96 ;    <ENTRY abbrevid=6 op0=2 op1=103 op2=114 op3=101 op4=101 op5=116 op6=105 op7=110 op8=103/>
97 ;    <ENTRY abbrevid=6 op0=15 op1=101 op2=120 op3=97 op4=109 op5=112 op6=108 op7=101 op8=95 op9=115 op10=97 op11=121 op12=72 op13=105 op14=87 op15=105 op16=116 op17=104/>
98 ;    <ENTRY abbrevid=6 op0=0 op1=115 op2=116 op3=114 op4=105 op5=110 op6=103/>
99 ;    <ENTRY abbrevid=6 op0=14 op1=109 op2=97 op3=108 op4=108 op5=111 op6=99/>
100 ;    <ENTRY abbrevid=6 op0=8 op1=101 op2=120 op3=97 op4=109 op5=112 op6=108 op7=101 op8=95 op9=118 op10=116 op11=97 op12=98/>
101 ;    <ENTRY abbrevid=6 op0=13 op1=115 op2=116 op3=114 op4=105 op5=110 op6=103 op7=95 op8=115 op9=116 op10=114 op11=105 op12=110 op13=103 op14=76 op15=105 op16=116 op17=101 op18=114 op19=97 op20=108/>
102 ;    <ENTRY abbrevid=6 op0=9 op1=95 op2=95 op3=101 op4=120 op5=97 op6=109 op7=112 op8=108 op9=101/>
103 ;    <ENTRY abbrevid=6 op0=12 op1=103 op2=101 op3=116 op4=102 op5=117 op6=110 op7=99/>
104 ;    <ENTRY abbrevid=6 op0=10 op1=101 op2=120 op3=97 op4=109 op5=112 op6=108 op7=101/>
105 ;    <ENTRY abbrevid=6 op0=17 op1=109 op2=97 op3=105 op4=110/>
106 ;  </VALUE_SYMTAB>
107 ;  <FUNCTION_BLOCK NumWords=18 BlockCodeSize=4>
108 ;    <DECLAREBLOCKS op0=1/>
109 ;    <CONSTANTS_BLOCK NumWords=3 BlockCodeSize=4>
110 ;      <SETTYPE abbrevid=4 op0=1/>
111 ;      <CE_INBOUNDS_GEP op0=4 op1=3 op2=21 op3=18 op4=21 op5=18/>
112 ;    </CONSTANTS_BLOCK>
113 ;    <INST_LOAD abbrevid=4 op0=34 op1=0 op2=0/>
114 ;    <INST_CALL op0=0 op1=0 op2=24 op3=1 op4=2/>
115 ;    <INST_CAST abbrevid=7 op0=1 op1=15 op2=11/>
116 ;    <INST_CALL op0=0 op1=0 op2=1 op3=3 op4=5/>
117 ;    <INST_RET abbrevid=9 op0=1/>
118 ;    <VALUE_SYMTAB NumWords=4 BlockCodeSize=4>
119 ;      <BBENTRY abbrevid=7 op0=0 op1=101 op2=110 op3=116 op4=114 op5=121/>
120 ;      <ENTRY abbrevid=6 op0=33 op1=115 op2=97 op3=121 op4=105 op5=110 op6=103/>
121 ;    </VALUE_SYMTAB>
122 ;  </FUNCTION_BLOCK>
123 ;  <FUNCTION_BLOCK NumWords=23 BlockCodeSize=4>
124 ;    <DECLAREBLOCKS op0=1/>
125 ;    <CONSTANTS_BLOCK NumWords=4 BlockCodeSize=4>
126 ;      <SETTYPE abbrevid=4 op0=1/>
127 ;      <CE_INBOUNDS_GEP op0=6 op1=4 op2=21 op3=18 op4=21 op5=18/>
128 ;      <CE_INBOUNDS_GEP op0=8 op1=5 op2=21 op3=18 op4=21 op5=18/>
129 ;    </CONSTANTS_BLOCK>
130 ;    <INST_LOAD op0=4294966291 op1=2 op2=0 op3=0/>
131 ;    <INST_CALL op0=0 op1=0 op2=24 op3=1 op4=3/>
132 ;    <INST_CAST abbrevid=7 op0=1 op1=15 op2=11/>
133 ;    <INST_LOAD abbrevid=4 op0=36 op1=0 op2=0/>
134 ;    <INST_CALL op0=0 op1=0 op2=27 op3=1 op4=5/>
135 ;    <INST_CAST abbrevid=7 op0=1 op1=17 op2=11/>
136 ;    <INST_CALL op0=0 op1=0 op2=1 op3=3/>
137 ;    <INST_CALL op0=0 op1=0 op2=5 op3=7 op4=1/>
138 ;    <INST_RET abbrevid=9 op0=1/>
139 ;    <VALUE_SYMTAB NumWords=2 BlockCodeSize=4>
140 ;      <BBENTRY abbrevid=7 op0=0 op1=101 op2=110 op3=116 op4=114 op5=121/>
141 ;    </VALUE_SYMTAB>
142 ;  </FUNCTION_BLOCK>
143 ;  <FUNCTION_BLOCK NumWords=15 BlockCodeSize=4>
144 ;    <DECLAREBLOCKS op0=1/>
145 ;    <CONSTANTS_BLOCK NumWords=3 BlockCodeSize=4>
146 ;      <SETTYPE abbrevid=4 op0=1/>
147 ;      <CE_INBOUNDS_GEP op0=10 op1=11 op2=21 op3=18 op4=21 op5=18/>
148 ;    </CONSTANTS_BLOCK>
149 ;    <INST_LOAD abbrevid=4 op0=23 op1=0 op2=0/>
150 ;    <INST_CALL op0=0 op1=0 op2=22 op3=1 op4=2/>
151 ;    <INST_CAST abbrevid=7 op0=1 op1=17 op2=11/>
152 ;    <INST_CALL op0=0 op1=0 op2=1 op3=3/>
153 ;    <INST_RET abbrevid=9 op0=19/>
154 ;    <VALUE_SYMTAB NumWords=2 BlockCodeSize=4>
155 ;      <BBENTRY abbrevid=7 op0=0 op1=101 op2=110 op3=116 op4=114 op5=121/>
156 ;    </VALUE_SYMTAB>
157 ;  </FUNCTION_BLOCK>
158 ;</MODULE_BLOCK>