[LLVMbugs] [Bug 3568] New: clang arbitrary-width integer types don't calculate size/ alignment correctly
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Feb 12 18:58:02 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3568
Summary: clang arbitrary-width integer types don't calculate
size/alignment correctly
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
I added support for arbitrary-width integer types in r64434. The one known bug
in the implementation is that Sema doesn't calculate the size/alignment
consistently with LLVM. (And for 128-bit integers, it calculates the alignment
to be 128 bits, which as far as I know is not consistent with gcc's TImode.)
LLVM logic for determining the size/alignment:
If there is at least one known integer type whose bitwidth is equal to or
larger than the bitwidth of the given integer type, the alignment is that of
the smallest such type. Otherwise, the alignment is the alignment of the
largest known integer type. The size is then the bitwidth plus whatever
padding is necessary to satisfy the alignment.
What makes this non-trivial is that TargetInfo doesn't expose a list of integer
types outside of the target description string, and it's definitely too much
work to parse the target description.
--
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