<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 - segfault in frontend while parsing Objective-C with OpenMP"
   href="https://bugs.llvm.org/show_bug.cgi?id=47790">47790</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault in frontend while parsing Objective-C with OpenMP
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tbruio@outlook.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Problem
=============
While parsing this simple file with openmp flags passed to the compiler,
frontend crashes (as it says) due to a segmentation fault. 

The code is a very toned down version of one of our project files, so excuse
the absolute paths and long compile command.

To get the crash, open the zip, compile the main.mm file using the command
written below. 

crash is in 2b510dd7e3c176926c36af1e83f3f033d55b1935 as well as release 11

Compile Command
===========
clang -Xclang -fopenmp
-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
main.mm 


Code
============
```
#include
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSWindow.h"
#include
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h"

class Foo {
  int a;
};

@interface Bar : NSObject <NSWindowDelegate> {
  Foo *foo;
}
- (void)setSystemAndWindowCocoa:(class Foo *)foo_1;

@end

@implementation Bar : NSObject
- (void)setSystemAndWindowCocoa:(Foo *)foo_1 {
  foo = foo_1;
}
@end

```
Output
=========
attached</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>