[llvm-bugs] [Bug 39849] New: Clang crashes when using C90 __restrict keyword

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 30 05:18:22 PST 2018


            Bug ID: 39849
           Summary: Clang crashes when using C90 __restrict keyword
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: guille at berkeley.edu
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 21181
  --> https://bugs.llvm.org/attachment.cgi?id=21181&action=edit
Source and preprocessed files for the two cases, triggering different crashes.
[Note: Decompresses to current directory]


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.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181130/1d5cc7c6/attachment.html>

More information about the llvm-bugs mailing list