[LLVMbugs] [Bug 7374] New: Clang ppc32 backend aligns 64-bit values incorrectly in structs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jun 14 06:55:02 PDT 2010


           Summary: Clang ppc32 backend aligns 64-bit values incorrectly
                    in structs
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nwhitehorn at freebsd.org
                CC: llvmbugs at cs.uiuc.edu

On PPC32, long longs are correctly specified as requiring 64-bit alignment,
which clang honors for freestanding long longs. Long longs in structs, however,
do not get appropriate padding added, and can be misaligned (see attached test
case). Worse, they occur at different addresses than their counterparts
compiled with gcc, making crashes very likely when linking clang-built code to
gcc-built libraries.

Observed with clang/llvm r104832 on FreeBSD/powerpc.

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.

More information about the llvm-bugs mailing list