pr18704.ll 8.0 KB

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