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

    <tr>
        <th>Summary</th>
        <td>
            "Assertion `!isa<ConstantExpr>(E)' failed." with compound literal
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          efriedma-quic
      </td>
    </tr>
</table>

<pre>
    Testcase:

```
struct A {int x[1]; };
A f();
typedef int *t[];
consteval int* f(int* x) { return x; }
int ** x = (t){f(f().x)};
```

Crashes with:

```
clang: clang/lib/AST/Expr.cpp:339: static clang::ConstantExpr *clang::ConstantExpr::Create(const clang::ASTContext &, clang::Expr *, clang::ConstantResultStorageKind, bool): Assertion `!isa<ConstantExpr>(E)' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang -x c++ - -o - -S -std=c++20
1.      <stdin>:5:25: current parser token ';'
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVM2y6jYMfhqx0cAkcgJkkYXhwKZd3CnnBRxHgHtCnNryudy37zhAe9ppNzfjiR39fNInKTYxusvI3EK9g_ptYZJcfWj5HBz3N7P8Izm76Hz_o33nKNZEBqWhmNe6eK5CRwnJCmqEzc6NgneodyXUb6B2CJu8QaE1noG2QM3jU35M3PMZsz2QlkcGD531YxT-NEPWAj08n8c7UJPjYGBJYcT7K0ihn1CzFYJ6Q6Ct5ICbXQZ4hl_dZ9Ez1FcaUOh9MPHKEb87uf4nVTuY8QJK4-NAx8F1QEd9egc6Hu5TWNlpAqWVarJVFCPO4ssLlN5nbmaUbJuz_R_VUxLYCANt54p8hdGn970fhe-Z8hpo_1X5wv6X-IX_G8c0yEl8MBf-xY19tuu8H-bmaNQxchDnR8ycqXTRgNr_M7sD0PaQ7WmDZ-MG7ldQ6G-_HvTpgDF1NydosEsXDDz5ICgeryJTzKnQEeh4cXJN3cr6W67i8PnallPwv7MVoKOLMXEEOqIZe3SjHVLPKFdGm_uEnbEfEozlTGAKPAVvOUbuMfoUHuLsaWL01hnhHkMaMdrgJsn5nsTYD-zTbXo0u1jh_HwL_hLMDU24pBuPEv_qOC7vaIF2QDtc4tLn1wmXUXpQb08F5UEpn1Cg9lF6N-aSKV2D0lTPaCkEHgUnEyIHFP_BIwJt8ljS5uvULfpW9Y1qzILbclOtN6qp6vXi2vK56ZUiW64r1ZTbra3Xpq-qqmk2xNVWLVxLBdVFXWyppKpcrwwpVlsuuqZXXJUNVAXfjBtWufArHy6LueRtqZpyXSwG0_EQ58uBaOTvOGuBKN8VoZ271aVLhKoYXJT4N4w4GbgFop-dJaL5H0Trb5NPY4-DEw5mWKQwtD8_SE9iny39GQAA__9Mwn8B">