<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 - compiler infinite loop aliasing bcmp to memcmp"
   href="https://bugs.llvm.org/show_bug.cgi?id=42728">42728</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>compiler infinite loop aliasing bcmp to memcmp
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Core LLVM classes
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ndesaulniers@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>clement.courbet@gmail.com, jyknight@google.com, llvm-bugs@lists.llvm.org, srhines@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22276" name="attach_22276" title="string.i">attachment 22276</a> <a href="attachment.cgi?id=22276&action=edit" title="string.i">[details]</a></span>
string.i

Possibly related to <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Linux kernel build: Regression due memcmp to bcmp optimization"
   href="show_bug.cgi?id=41035">https://bugs.llvm.org/show_bug.cgi?id=41035</a>.

declaring bcmp as an alias to memcmp, then using memcmp in a way that it would
be lowered to a bcmp is resulting in the compiler not exiting.

Attached is a test case. Observable at -O1 and above, but not -O0.

Instead, I can work around this with an explicit tail call, but it's curious as
to why the addition of the alias causing the compiler to hang.</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>