<div dir="ltr"><div>Hi all,</div><div><br></div><div>There are several bugs, manifested as a crash when clang treats really huge arrays (PRs 8256, 12816, 15216). The arrays are so huge that bit size cannot be represented by 64-bit integer.</div>
<div><br></div><div>There are several ways to fix these defects.</div><div><br></div><div>1. Emit an error if the array size cannot be represented by 64-bit number. In this case changes to the clang sources are minimal. However some arrays accepted by GCC would be rejected.</div>
<div>2. Use bytes to represent size and alignment of a type. It looks like values other than multiples of 8 aren't used.</div><div>3. Represent the bit size by some new type, say BitUnits (similar to CharUnits). This type could allocate more space to represent all possible values of bit size, or use some encoding to pack any bit size into uint64_t (for instance to store the size in bytes, if it is larger that some value).</div>
<div><br></div><div>Probably using bytes to represent size and alignment is the most natural way to fix these problems. Is there a need to keep size/alignment with bit precision?</div><div><br></div><div>Any thoughts?</div>
<div><br></div><div><br></div>-- <br>Thanks,<br>--Serge<br>
</div>