[llvm-bugs] [Bug 32033] New: [hexagon] LLVM codegen assertion failure with some objc code

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 21 15:28:44 PST 2017


https://bugs.llvm.org/show_bug.cgi?id=32033

            Bug ID: 32033
           Summary: [hexagon] LLVM codegen assertion failure with some
                    objc code
           Product: new-bugs
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: j.neuschaefer at gmx.net
                CC: llvm-bugs at lists.llvm.org

Created attachment 18013
  --> https://bugs.llvm.org/attachment.cgi?id=18013&action=edit
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.

-- 
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/20170221/418190e9/attachment.html>


More information about the llvm-bugs mailing list