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

    <tr>
        <th>Summary</th>
        <td>
            [clang] Recursive initialization causes front-end to seg fault
        </td>
    </tr>

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

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

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

<pre>
    I've reduced a regression to:

```
commit [ca619613801233ef2def8c3cc7d311d5ed0033cb](https://reviews.llvm.org/rGca619613801233ef2def8c3cc7d311d5ed0033cb) (HEAD, refs/bisect/bad)
Author: Corentin Jabot <corentinjabot@gmail.com>
Date: Sun Oct 23 17:32:58 2022 +0200
```

```
struct A;

int f(const A&) { return 42; }

struct A {
   int x = f(A());
   A() { }
};

void foo() { A(); }
```
```
clang++ t.C -c
Segmentation fault (core dumped)
```
No diagnostic.  Admittedly the test is contrived, though it didn't cause the front-end to segfault before.  It's not clear to me if there's anything in the language that requires the compile time evaluation, for which the segfault can be justified.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVM1ypDYQfhpx6fIUtIYBDhxmzDrZHJKq7BMIqQG5QHKkZhzn6VPS2Guvs4dUTQ3wqfvT178qRjs7ol7UF4GofZCOrROIoh4KtfPiQ69p9M8rhWL05qX_KrC5EgQyuyYDCgLNgWK03gF7Ic-iHET59n8qX3_5U_ttswyivmh1qrpTJduyQilpQkNTq6XWjZFVZWoyZSmlHkU9CGwX5qeYqPFB4EOgq6XneFjX63bwYU7QL_-bEDsQ2P765TwIvIdAUxT4MNpImtOLMgK7m9pzDl_IM9z7QCkv8JsaPYOQ9_oVeUyAOJbzpux60H4T8svNe1BMyffb7uAPzYASqkbIs0Qhz3ULWCKCwEuJZfnTZP0UjBx2zXAW8vLRyjqGSWCrvYvpFE85zuYCgXgPDo4o5AVEM3z0eiNLhjcEABLV3yDkkAnPAtuUEOy-3wgAr2i-4J2zGT6punprYPL-g_Ub3w9iPsX9qWdW5WaBF4EX4MM93Okb_o3mjRwrTo03qX1lyAkIBGbfnui9jp8If_dgrJqdj2z1AeBsNstMZn0BXgiYIoONoL3jYK-J5x548fu8gGUw1jiBDYNWe6TsMQXv-I6cAfYQab6JGWnygQ4AX1lgE8F5Br2SCslqI7BTcg6UD5V74cW6GazLlCnmXc2JXzEE-mu3gWI-0n57sisB242ArmrdcwqSyskHeF6sXrLhdyVaORgJHvfIdrJkDoXppelkpwrqq1Mj2-7YVcdi6SdSsqq75lRSq2VrDLVTM0513ala0qgK22OJsqyqU9UeW3k81PqoNerypKhukTpxLCmPwttwFjbGnfpTWbZYrGqkNeZlUw9F6JPR3bjPURzL1UZ-n-mCLa95Ld3qXw_wJ-k9RHslsM6yVav951b8XIn4nzLcmqLYw9r_uD9my8s-5mHFh3Th6-PuKfjH2xrIotNiyLr_DQAA__8Er4gf">