<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 crashes when compiling tensorflow"
   href="https://bugs.llvm.org/show_bug.cgi?id=45067">45067</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang crashes when compiling tensorflow
          </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>All
          </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>craig.topper@gmail.com
          </td>
        </tr>

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

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llozano@chromium.org, llvm-bugs@lists.llvm.org, manojgupta@google.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After <a href="https://reviews.llvm.org/rG84cd968f75bbd6e0fbabecc29d2c1090263adec7">https://reviews.llvm.org/rG84cd968f75bbd6e0fbabecc29d2c1090263adec7</a>, we
are noticing a clang crash when building Tensorflow.

Craig, since it was your change, can you please check?

repro command:
clang "-cc1" "-triple" "x86_64-cros-linux-gnu" "-emit-obj"   "-target-cpu"
"skylake" "-target-feature" "+sse" "-target-feature" "+sse2" "-O2"
"-vectorize-loops" "-vectorize-slp" "-x" "c++" "reduced.cpp"  -Wno-error

test case:

struct TfLiteNode;
struct TfLiteContext;
using a = int;
float b;
namespace tflite {
int c();
int *d;
a e;
namespace ops {
namespace builtin {
namespace activations {
template <typename> void f(int, int, float, int *) {
  int g = c();
  static a h;
  for (int i = 0; i < g; ++i)
    if (e)
      d[i] = h;
}
void LeakyReluEval(TfLiteContext *, TfLiteNode *j) {
  f<int>(0, 0, b, reinterpret_cast<int *>(j));
}
} // namespace activations
} // namespace builtin
} // namespace ops
} // namespace tflite</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>