<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 - Verifier allows pointer to void but is caught by IRReader"
   href="https://bugs.llvm.org/show_bug.cgi?id=44497">44497</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Verifier allows pointer to void but is caught by IRReader
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Bitcode Reader
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vaivaswatha@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23002" name="attach_23002" title="Toy program to produce and verify a simple function foo">attachment 23002</a> <a href="attachment.cgi?id=23002&action=edit" title="Toy program to produce and verify a simple function foo">[details]</a></span>
Toy program to produce and verify a simple function foo

The LLVM library allows generation of a function "i32 foo (void*)" that has a
"void*" argument, and the IR is successfully verified by the verifier. But the
IR parser (correctly) flags it as an error.

This bug should be in the IR category (but that doesn't exist), so I'm filing
it under IRReader

I've attached a toy program that produces and successfully (but incorrectly)
verifies a function with "void*" argument. It can be compiled as

"g++ -g llvm_void_ptr.cpp `llvm-config --cxxflags --ldflags --system-libs
--libs core` -std=c++14".

Upon running the produced executable, it produces, verifies and prints "foo"
(the function that takes a "void*" as argument. This emitted IR is however not
parsable by "opt". The verifier should check against this and flag an error.</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>