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

    <tr>
        <th>Summary</th>
        <td>
            Constant Interpreter lacks support for alignof
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```cpp
#include <cstddef>
```
`clang++ -fexperimental-new-constant-interpreter` gives:
```cpp
In file included from /opt/compiler-explorer/clang-trunk-20221103/lib/clang/16.0.0/include/stddef.h:109:
/opt/compiler-explorer/clang-trunk-20221103/lib/clang/16.0.0/include/__stddef_max_align_t.h:21:34: error: 'aligned' attribute requires integer constant
      __attribute__((__aligned__(__alignof__(long long))));
                                 ^~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/clang-trunk-20221103/lib/clang/16.0.0/include/__stddef_max_align_t.h:23:34: error: 'aligned' attribute requires integer constant
      __attribute__((__aligned__(__alignof__(long double))));
clang/lib/AST/Interp/ByteCodeExprGen.cpp:153: bool clang::interp::ByteCodeExprGen<clang::interp::ByteCodeEmitter>::VisitCastExpr(const clang::CastExpr *) [Emitter = clang::interp::ByteCodeEmitter]: Assertion `false && "Cast not implemented"' failed.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNFMtunDDwa8zFAhmzvA4c9pFUOTfqFRkYWDdeTG2TJn_fMbDZKqqaQ1W11mg89tjznml091qRjK3QThNhJ8L2hCdybNXcASXJsbWu66Anyd3Gvb5_O7ZKjAPhBwQa9vAygZEXGJ1Q4Qjfw1aP1onRhXJ0YCYDiPEXHeQzWJLs34l9M-NhpL1UQDdbOtobfaGE3-vJIW71ZUK2CVGh0gZl4p23JHRmHp9CzjiPY5bgtZLNlYl7nEUsYkhsgpFaXYzOaE3MyptNf0NXXa_a6ot4qYWSw1i7RTOPESU7RBSM0cYThOfLE-iQosI5I5vZATXwbZYGLPUxHcDQa5BXw-my6vrtQ10TXiDU9SZuudhOul9OSo8D9Yjw8gbJ4WeRv1kkvSP5n8G_CHryHwS903Oj4Jdhv_q0erj__Ij4YekjJA6vDo66g7uXyXyCMfKtgxWcep9oo7Wi63es52S_dt9Kv_vou_yDhxfpfNviEFjuv0gr3VFY5yWgG0skftZ25WEwMaMlVsdhk4Ez5fShXZu69OQ92VsLxkk9UhwPvVAW5xLPEHDjXhEdtaPyMinwY8enjfvM9QLLp4vezZcAqjjL8jQv810ZdFXSlUkpAiedguq4ZZQ-3GYVVaJ9stTO06SNo702dMtgMBtVnZ2bljHG7xEG6c5zE2Ht-qSp5-sWTkZ_hdbXtbR2xsHH79OiiLPgXEHHirjjjJUFb5McgPEM-gx4zKDkcR4o0YCyFcYQPcORShcR3sv0FMhqa4RdnCXprojKOBfA4iZv2jwu0oLsGFwwFJG3I9JmCEy1mNTMg0WmktbZG1NY64sVFnUoX8zurE31aJCRmGBRXS2m_wABS-iI">