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

            Bug ID: 45136
           Summary: -Xclang -malign-double lowers alignment of long double
                    to 8
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Created attachment 23214
  --> https://bugs.llvm.org/attachment.cgi?id=23214&action=edit
Example

When compiling with `-Xclang -malign-double` the `alignof(long double)` returns
8, while without the flags it returns 16. Basically the alignment is lowered.

I am not sure if this is the intended behaviour, I guess that this flag should
only set alignment on `double` from 4 to 8 on 32-bit systems.

For comparison GCC returns 16 with or without the flag `-malign-double`.

Tested on Linux x86-64 and OSX x86-64 (clang also with `-m32`). I suppose that
for 64-bit builds it should do nothing but it still lowered the alignment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to