<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Error parsing LLVM function without entry label"
   href="https://bugs.llvm.org/show_bug.cgi?id=40113">40113</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Error parsing LLVM function without entry label
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>contact@yannic-bonenberger.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21256" name="attach_21256" title="C source">attachment 21256</a> <a href="attachment.cgi?id=21256&action=edit" title="C source">[details]</a></span>
C source

Steps to reproduce:
  - Download good.ll (Generated by `clang -S -emit-llvm good.c` and then
manually reduced to a smaller example).
  - Run `lli good.ll` and see that there are no errors.
  - Download bad.ll which removed the entry-label from function @x.
  - Run `lli bad.ll`

What is the expected output:
good.ll and bad.ll should behave exactly the same.
I'm not sure whether good.ll or bad.ll produces the wrong output.
If it's good.ll, then it is a bug in clang's code generation.
Otherwise, it's a bug in the IR parser.

What happens instead:
`lli good.ll` shows no errors, `lli bad.ll` shows the following error:

lli: bad.ll:5:3: error: instruction expected to be numbered '%1'
  %0 = load i32, i32* %a.addr
  ^</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>