<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65784>65784</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Assertion failed: ((!Result.isArray() || Result.getArrayInitializedElts() == 0) && "zero-initialized array shouldn't have any initialized elts"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ahatanak
</td>
</tr>
</table>
<pre>
$ cat test.cpp
```
struct ty { int *ptr; };
const struct ty arr[] = {(int *)("")};
void f(void) {
int *x;
x = arr[0].ptr;
}
```
$ clang++ -std=c++98 -c test.cpp
Assertion failed: ((!Result.isArray() || Result.getArrayInitializedElts() == 0) && "zero-initialized array shouldn't have any initialized elts"), function VisitCXXParenListOrInitListExpr, file ExprConstant.cpp, line 11315
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUUsFu2zAM_Rr6QiSQKSu2Dj4kcQMMGLBhh6FXxVZibaocSHTX9OsHK-laDPuBAYJNmu-RfE82KblzsLYFtQPVFWbmcYqtGQ2bYH4Wx2m4tkAV9oaRbeJ1f7mA6EBsYSPuJ6eJ49wz8hWh3qELjEDbC0eQO4S6A7m74fopJMZ3tInxNhtBdgsXqLmzgTRQA0T56I9dnic34AmoWQIgnYm5gm-zX_6AEV9y89soAapb3xa7C6m7fyq6Pxfx3oQz0A5oh6vEA8iuv6W6wVX_lzHblGxkNwU8GeftAHKLWUcDVH6zafa8dmkbo7nmb8vye6j3eK-dLefip-DYGe9e7fDgOb1hZbdoETmmDdAGgejVxmnl3gmLVnPFNE6zHwJQzTiaZ4smXPEjzObG2V3a42kOfV78u0uO94-PX0204bNL_CUu2yzRw8slZqzzFpdkv1yoCTcDaI_eBYtlKUtVDK0ctNSmsG250VWplS7LYmwrrfp60Eabyghd93WpVC207Km3qlTHwrUkSAotmrJWjSzXTaMlVUKo6qSUrSVUwj4Z59fePz-tp3guXEqzbTeqbqrCm6P1Kf_TRMH-wlxcdKquiO3CWR3nc4JKeJc4vXdhx962_-ENFnP07ch8SSC3QAegw9nxOB_X_fQEdFgU3l-rS5x-2J6BDtmXBHTIvv0OAAD__3MCNu8">