[llvm-bugs] [Bug 34299] New: `__attribute__((__aligned__))` is incorrect for ARM

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 23 11:24:27 PDT 2017


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

            Bug ID: 34299
           Summary: `__attribute__((__aligned__))` is incorrect for ARM
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: compnerd at compnerd.org
                CC: llvm-bugs at lists.llvm.org

```
struct s {} __attribute__((__aligned__));
_Static_assert(_Alignof(struct s) == 8, "mis-aligned");
```

With GCC:
 $ armv7-unknown-linux-gnueabi-cc -c /tmp/align.c -o /dev/null

With clang:
 $ clang -target armv7-unknown-linux-gnueabi -c /tmp/align.c -o /dev/null
/tmp/align.c:3:1: error: static_assert failed "mis-aligned"
_Static_assert(_Alignof(struct s) == 8, "mis-aligned");
^              ~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

-- 
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/20170823/23748877/attachment.html>


More information about the llvm-bugs mailing list