[LLVMbugs] [Bug 18575] New: Assertion `!Packed && "cannot layout even as packed struct"' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 21 16:35:23 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18575

            Bug ID: 18575
           Summary: Assertion `!Packed && "cannot layout even as packed
                    struct"' failed
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Yunzhong_Gao at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Tested against clang version 3.5 (trunk 199759).

Clang asserts on this test case:
/* bad.cpp */
struct Base
{
  char x;
};

struct Derived_1 : virtual Base
{
  char y;
};

struct Derived_2 : Derived_1
{ } __attribute__((packed))
x;
/* end bad.cpp */



If I add a data member to Derived_2, then it works fine.

/* good.cpp */
struct Base
{
  char x;
};

struct Derived_1 : virtual Base
{
  char y;
};

struct Derived_2 : Derived_1
{ char z; } __attribute__((packed))
x;
/* end good.cpp */

-- 
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/20140122/85f56775/attachment.html>


More information about the llvm-bugs mailing list