<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 - ICE on valid code with -O1: fatal error: error in backend: Instruction Combining seems stuck in an infinite loop after 100 iterations."
   href="https://bugs.llvm.org/show_bug.cgi?id=50969">50969</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE on valid code with -O1: fatal error: error in backend: Instruction Combining seems stuck in an infinite loop after 100 iterations.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>C
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>cnsun@uwaterloo.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clang-trunk -v
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
65eb4028ad0322115ff5420499806db79a27289e)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$ cat mutant.c
mul_double ()
{
int j, *prod;
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (j = 0; j < 4; j++)
for (; j < 4; j++)
*prod = 0;
}

$ clang-trunk -O1 -w mutant.c
fatal error: error in backend: Instruction Combining seems stuck in an infinite
loop after 100 iterations.
clang-13: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
65eb4028ad0322115ff5420499806db79a27289e)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/cnsun/usr/bin
clang-13: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-13: note: diagnostic msg: /tmp/mutant-000f7c.c
clang-13: note: diagnostic msg: /tmp/mutant-000f7c.sh
clang-13: note: diagnostic msg:

********************</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>