<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72503>72503</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang][ARM]report error for big struct
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          CoTinker
      </td>
    </tr>
</table>

<pre>
    demo.c
```
struct A { unsigned a : 1; unsigned b : 1; };
struct B
{
  unsigned char c[0x40000000];
  unsigned char d[0x40000ff0];
  struct A e;
};
```
For this demo, gcc will report error such as:
```
<source>:7:1: error: type 'struct B' is too large
    7 | };
      | ^
```
https://godbolt.org/z/adr4EPhzv

clang is not report error.

Someone say that the maximum size of a structure in gcc is `PTRDIFF_MAX == 2^31 - 1`, I wonder if clang has any rules on the size of the structure.
https://stackoverflow.com/questions/7724790/are-there-any-size-limitations-for-c-structures/49206497#49206497
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVE1vpDgQ_TXFpUTLH9AOBw50E6Q5jDSancPeVgYMeMfgrG2S6fz6FQ5Jp1uxWk25VPXeq4eN9F6Pi1Il5CfI60SuYbKuPNtfevmtXNLa_lL2araHDkgNpIIj2X9x64Nbu4AVgjjhukSwHiUCr5AC_5RrrzkQNfDTDcC-A7EHeG3sJumwg_xE_mTkbUF-Bbiv7K-Vw3BX-aFWfSQ_a7mbrbEOw6Q9bvMDO-PYdfiijUGnnqwLqJyzDv3aTSg98OpLFOBnb1fXKeCPwCsBvKKbE7F5C8LlSSEw8eEEE6g9BmvRSDeqd_GIAkGcb9zDuGI2f_ySfgrhKWpjDbBmtH1rTThYNwJrXoE1snfZ44_p9Xnvjv-dkcu4iVhsuBn28LnqLzsruyj08oJhkgHDpHCWf_S8zuj1q0I7oNxNX51CvUQLtUc4kh-_ftbfmuaf79XfCLwGXiOD_JFTTJFu8tkZv-GLXXrlUA_4pmmSHuVyQbca5dEukfOdK8bvbIev5vdBdr_ts3KDsS-Hzs7Amv9W5YO2iwfWCMEyUZDNF6fSMCmnUrlc0o0hNXrWQcbSdLAu7dIPsq03Kxg5ZoUAxt_DpC95X_BCJqqkghDKsyLLkqmkmRBCUTYQWhzbbiAq4718yKg49kfa54kuGWGcUnqkNGMsO3Rt0XOpeK_yh4ee55ARNUttDsY8z9v7TLT3qyoFywlPjGyV8fFSMxadA8a2--3KrT5t19FDRoz2wV8Rgg4mfgneOvIa8lP18zvk9c2BH6zDVo-71cnqTHl3ynSY1na3d0PfH-mTs_-qLgBrotjo-Kb3_wAAAP__AnFX_w">