<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 - Infinite loop in a recursive call graph"
   href="https://bugs.llvm.org/show_bug.cgi?id=49687">49687</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Infinite loop in a recursive call graph
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>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>pctammela@gmail.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=24681" name="attach_24681" title="Simplified IR found by bugpoint">attachment 24681</a> <a href="attachment.cgi?id=24681&action=edit" title="Simplified IR found by bugpoint">[details]</a></span>
Simplified IR found by bugpoint

I have a recursive call graph that is apparently entering an infinite
loop, at first I observed this when forcing inline in the optimization pipeline
but later bugpoint found a more concise pipeline that reproduces the bug.

Bugpoint found the following 'opt' invocation to enter the infinite loop:

   opt -inline -simplifycfg -tailcallelim -loop-unroll

As a comparison, the original C code when compiled with GCC and the
'alwaysinline' attribute errors out, for all optimizations, with the following:

   out.c: In function ‘__foo’:
   out.c:252:50: error: inlining failed in call to always_inline
   ‘__bar’: function not inlinable</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>