<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 using C90 __restrict keyword"
   href="https://bugs.llvm.org/show_bug.cgi?id=39849">39849</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crashes when using C90 __restrict keyword
          </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>normal
          </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>guille@berkeley.edu
          </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>Created <span class=""><a href="attachment.cgi?id=21181" name="attach_21181" title="Source and preprocessed files for the two cases, triggering different crashes. [Note: Decompresses to current directory]">attachment 21181</a> <a href="attachment.cgi?id=21181&action=edit" title="Source and preprocessed files for the two cases, triggering different crashes. [Note: Decompresses to current directory]">[details]</a></span>
Source and preprocessed files for the two cases, triggering different crashes.
[Note: Decompresses to current directory]

<a href="https://godbolt.org/z/j_WU8P">https://godbolt.org/z/j_WU8P</a>

Minimal code is:
#include <immintrin.h>
struct S  {  __m128 operator + (const __m128 r) const { return r+l; } };
struct A
{
  S s;
  __m128 v;
  void f(A& /*__restrict*/ a) __restrict __attribute__((used)) { v += s+a.v; }
};
int main() { return 0; }

Reporting two different crashes (files t1.cpp, t2.cpp attached). 
Commenting in/out the first '__restrict' does not affect the result. 
It's the second '__restrict' (the one affecting 'this') that triggers the bug.</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>