<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 - clang non-deterministic DEBUG_VALUE output, armv7a-linux-androideabi -mthumb -O2 -g"
   href="https://bugs.llvm.org/show_bug.cgi?id=37970">37970</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang non-deterministic DEBUG_VALUE output, armv7a-linux-androideabi -mthumb -O2 -g
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chh@google.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=20485" name="attach_20485" title="output 1.s and 2.s have different @DEBUG_VALUE sequences">attachment 20485</a> <a href="attachment.cgi?id=20485&action=edit" title="output 1.s and 2.s have different @DEBUG_VALUE sequences">[details]</a></span>
output 1.s and 2.s have different @DEBUG_VALUE sequences

To reproduce, modify and run the run.sh script in the test.zip.
Repeated compilations of the same input file produced different @DEBUG_VALUE
sequences in 1.s and 2.s.

The problem occurred with -target armv7a-linux-androideabi -mthumb -O2 -g.
Other targets, -O1, or -g1 seemed to produce deterministic output.

I traced back to llvm change <a href="https://reviews.llvm.org/rL321862">https://reviews.llvm.org/rL321862</a>,
which started to have such problem. I am not sure if that change
is buggy or just exposed an older bug.

The test case was reduced from Android open source code.
It is required in Android release process to be able to generate identical
output from the same input and compiler. We cannot release Android without a
fix or reversing rL321862.</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>