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

           Summary: incorrect alignment for struct containing double
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


On x86, the alignment requirement for `double' is 8 bytes and this is correctly
reported by __alignof. However, for a struct containing a double, __alignof
reports 4:

  struct hasdouble { double d; }; // alignment = 4

This is a problem on a system with alignment checking turned on. Note that it
correctly aligns the struct on x86_64. Also note that GCC has the same, in my
opinion incorrect, behaviour.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to