<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 - [hexagon] LLVM codegen assertion failure with some objc code"
   href="https://bugs.llvm.org/show_bug.cgi?id=32033">32033</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[hexagon] LLVM codegen assertion failure with some objc code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.9
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>j.neuschaefer@gmx.net
          </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=18013" name="attach_18013" title="ObjC code that crashes clang">attachment 18013</a> <a href="attachment.cgi?id=18013&action=edit" title="ObjC code that crashes clang">[details]</a></span>
ObjC code that crashes clang

Hi! The following program makes clang crash (with an assertion failure, if
assertions are enabled):

---8<-----------------------------------------------------------
/* Compile with clang-3.9 -cc1 -emit-obj foo.m */
@protocol Object @end
@interface Object {} @end

@interface Container <ObjectType>: Object
- (ObjectType const *)objects;
@end

@class Stuff;
@interface A : Object
{
  Container <Stuff *> * _stuff;
}
@end

@implementation A
- (void)method
{
  Stuff *const *objects = [_stuff objects];
}
@end
---8<-----------------------------------------------------------

Equivalent one-liner and result:
$ base64
-d<<<H4sIAMJcrFgCA02OQQ6CMBBF9z3FXwqJFxAlEA/gQnfGGCxDrIEOoaOJIdxdpQXZvvn/zc/ajoU11zjcHqQFGdlSZcYKdVWhacL94C/L056tFMZSh61Pnd4tpZtQUWus/hiarRPEEY/IJSrodF04h6M8qypZynPMol5h+WvMIk4R4+p8b5hspmlrauibFcMW+W/Ei00ZNSR3LkdV6IdBYQ92OHsbArnM2g8WmkgyJAEAAA==|gzip
-d|clang-3.9 -cc1 -emit-obj -x objective-c -
Stored value type does not match pointer operand type!
  store i8** %call, %1*** %objects, align 4
 %"type 0x55a0d48564b0"**fatal error: error in backend: Broken function found,
compilation aborted!

I have tested clang 3.8, 3.9, and 4.0-rc2 as shipped in Debian: They fail with
the same error.</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>