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

    <tr>
        <th>Summary</th>
        <td>
            Clang rejects valid int iarr [10] alignas(Required); 
        </td>
    </tr>

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

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

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

<pre>
    The following valid program is rejected by clang but accepted by both gcc and msvc. [Demo](https://godbolt.org/z/j54c4KxMa)

```
constexpr std::size_t Required=16;

int iarr [10] alignas(Required); 
```

Clang says:

```
<source>:16:15: error: 'alignas' attribute cannot be applied to types
   16 | int iarr [10] alignas(Required); 
      |          
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkj2P2zwMxz8NvRAXyJJfBw_J5fHyoEvRvaAl1tFBsVxJTi_36Qsnbloc2uEIg5YEkfxR_FOMdpyYOygPUB4zWtLJhy7QRDR5P2eDN9fuy4nxm3fO_7DTiBdy1uAc_BjojDZi4BfWiQ0OV9SOphGHJSFpzfN2Ovh0wlFrpMngOV70DqE8HPnsoTyCbE4pzRHUHmQPsh-9GbxLOx9GkP0byP6lLHTx_-snAtmCOILYb74S23fbaj_FxK9zwJjMmk7to33jrwk_8_fFBjagjnkF6vBnEjsltBTCipQLKI9Izo4TRZDNI062oA7416p3_3xrPNL11se_GUE9R78EzaD-A7VfafZ5CWqPHIIP6wJk_SCokVIKdlgSo6Zp8gkHRppnZ9lg8piuM8d7akTMK4T6GT_cEt5sDX3YO_rMdMq0qqWMu7yWRauqphLZqVO5HnTTFLpoSMmcayOGqqWaRFkXojKZ7aSQhWhkmytRq3YnioIapWUjhFYkDBSCz2TdzrnLeZ16ZmNcuMtFVZZ55mhgF38pNHTrradhGSMUwtmY4u-4ZJPj7j6KuyrjJtcPvEi2BNe9U6RNp2XYaX8G2a_Vtt_THPxaBWR_Q44g-4360smfAQAA__9QTv8U">