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

    <tr>
        <th>Summary</th>
        <td>
            Clang frontend C++ with an incompletely initialized variable
        </td>
    </tr>

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

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

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

<pre>
    To quickly reproduce: https://gcc.godbolt.org/z/zM96br3P7 (assertion-trunk)

```cpp
#include <iostream>

class Base10 {
public:
        consteval Base10(const char* p) {}
 consteval operator int() const { return 1; }
private:
 std::string _vals;
};
int main()
{
    using namespace std;
 cout << Base10{ nullptr } << endl;
}
```

Compiling the above code crashes clang `clang++ -x c++ --std=c++20 `, crashes locally using clang-17.0 (a10019a), also on trunk with assertion (see godbolt link) 

Note that after removing the private field, the code compiles successfully. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcVMuy4yYQ_Rq06bILg63HQgvLN94llUX2qRa0LTIYFB6eeL4-hSxf3xmVHtBwus_pboQxmqsj6tlhYIePCnOafOjHkBPaiHe8UjV6_ej_8vBvNuqbfUCgOXidFTF5hCmlOTJ5ZOLMxPmq1Pbq9eht2vpwZeL8ozy_d_UY5J8NMNFijBSS8W6TQnbfmOgY_2D8uL5r_rzVPK8WIY1TNmsCJk_GxxQIb0z-9hWmLMYIA0bacWDN8LTOebRGFXLLFNZLeRcT3dGuACbaxQRqwsDEEWYmusVL87Ei3xA_U8DkAxiXmGjLzieYNQMESjk42DE5wCd4DuaOid40YtJlIo8xBeOu8PcdbWRyJV1wr7FxCW5o3DPQa314y8mxOHB4ozijoqfr4ZN0TiVnTJ5eSpsBXLZ2TqHwey2S0_an-D-X4muiT_42G1uCpokAR38nUF4TqIBxogjKortCKWAZMDEwMcDmP1Cv4Wbh-LHOBS97mTh9OrBeobWPVdriZbNrtnzpnR3nuw5LLsQJ0EYP3sHSR_DdpAk-m6vsjkSwNiNYs7QafNXyh08EacIEeEkUINDN31_S1qrBxZDVJVoxPpUuKaAIMStFMV6ytY8tVLqXupMdVtTv6k60h64WvJr6UWpdtxovXLeNOBDKutU1XsZD16j2sK9ML7iQvBV7Xu8bzrdadqJttdhLddipg2B7Tjc0dmvt_VbOVWVizNTX-27fVRZHsnE5wEI4-g7LIhOinOfQF8xmzNfI9tyamOLbSzLJUn9aKnYJ3iVyGk5roZ75dGBcEWwpkX2AcSYZtOYHabhjMDhaqnKw_S-_AZOmPG6VvzFxLuHWz2YO_h9SiYnzQjIycV5E_B8AAP__rsBh-g">