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

    <tr>
        <th>Summary</th>
        <td>
            [consteval] clang crashes in AggExprEmitter::VisitConstantExpr
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            c++20,
            clang:frontend,
            clang:codegen,
            consteval
      </td>
    </tr>

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

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

<pre>
    clang's CodeGen crashes when the following code is compiled:

```
struct Base {
  constexpr Base() : a(0), b(0) {}
  int a, b;
};

struct Derived : public Base {
  consteval Derived() {}
};

void test() { Derived str = Derived(); }
```

This is possibly related to https://github.com/llvm/llvm-project/issues/54612.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUtuO3CAM_RrygholJOTykIeZyW5_oOo7CU5Cy0AEZLb79zXZua1WfaqEwObYx-bgwcr3btTCzITVnp6shO9g6OiEX8DTtwWdsACdrNb2TZmZjhhClcfzvCoNkhQHkvUku-1Vdl2764PbxkCPwgMl9fHjkmKy8QH-rG5HCGsIaykyUYF2hg5hJzpc7T2x7m-5yoQYFvHiShjRu_1ctwenLiB36nUbtBr_0cpF6FvwrZunol_5L1ZJGsCHR_S9GNbGgv1nPsynD77PIn3sPxZUFddqvVeDfqcOtAjIFyxdQlh9VJq94ppVWLYhxR9AR-vL7fi2OvsLRuzpVXm_gUeDl1XO0gS6vKo4z-ui5onsCtkWrUiCCho6wo93EQjv6T4O9xFQhh7m-QX_6uWsQgAX2ygOP5VX4RTThAkRTTanu__os2FtmyzdlE1VWbGyGCUbWAMgq6FthrrmY16OtUy0GED72DRhbCQMjyPDMWFxJOLVPszFYXLWBDDyKxIneAbzBNxfj1e8T1THMsbyLM_ztmScp7yZQPC6zmEooZkKUmZwFkqn8TWpdXPiuv1hwzZ7BLXywT9AgR86G9iVjvxiC4t1nVgEiid-J7sI3a7AXyYND_4">