[LLVMbugs] [Bug 19999] New: fail to respect __attribute__((aligned)) on typedef used as type of field

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 10 16:57:25 PDT 2014


            Bug ID: 19999
           Summary: fail to respect __attribute__((aligned)) on typedef
                    used as type of field
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: richard-llvm at metafoo.co.uk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

typedef __attribute__((aligned(32))) char &cr;
  struct S { char a; cr q; };
  static_assert(alignof(cr) == 1, "");
  static_assert(alignof(S::q) == 1, "");
  static_assert(sizeof(S) == 64, "");

All of those static_asserts should pass, but currently the last one fails. We
apparently don't pick up 'aligned' attributes on typedefs when performing
record layout.

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/20140610/3c15fa4d/attachment.html>

More information about the llvm-bugs mailing list