<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57935>57935</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-15 segfault on ppc64el with -O2 optimization
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LocutusOfBorg
</td>
</tr>
</table>
<pre>
os: Debian experimental
Ubuntu kinetic
cat test-O2.c
```
typedef struct {
struct {
char a[16382]
};
} astring;
struct a {
int *f
};
typedef struct {
struct a *g
} h;
struct {
int i;
h j[]
} k;
astring a, e;
c, d;
l() {
int b;
m(a, e);
do
do
if (k.j[c].g && (*k.j[c].g).f)
++b;
while (c++);
while (d);
if (b)
n();
}
```
clang-15 -O2 test-O2.c #fail
clang-15-O0 test-O2.c #works
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFU8GOozAM_ZpwsYogKRQOObRbzWmlnvYDkhAg05QgErY7-_VraEvpzEqDLEj87OfnxEhXfXDnCdvDUUsjOtB_ej2Yi-6CsCQ5kmQP8_NLjl0Y4Ww6HYy6IUoECNqHzYnGCm4-kid3m7fho9eVrsGHYVQByO7wIP3qAVCtGECQ7JDmrKAkOz4gsjsSdg_ENQjMNl3z9M3vO6VYk5oOa9B9veQuOd9KE1Ni8yzaLqlfU6YyZsEBWnjHNpYOpvTzJ7X3HrBf-gP0AqppW32KtYQWhJafK8pVxQuG3KloufJX7nm-6zUy1NhgcY4npQqlxg3uczSYq-3XCHLG9US8ysdroQe0tQqAa2usnhjUDX1Vs6DVq_-mRb5U6G5Nry_-vzOmrOiaTZoBzuF6HimrhbGvMZtT8hpydcPZR5qnec7KbZ6nRVRxVpWsFFEwwWq-0Hvd1GK0AVwHfa_yrbZwNaGd67o-mIv5K4JxXTQOlrch9NOPRegbWoNxo4yVw2t6s_b347PpB_euVcCt8X7UHhfZrmRZ1HKWSyWrtEizrFBlXtCsztKKFbXQSbIVZWSF1NbzadAo7fQVZgpc45VFhtOE0qSkLM0oY7tYFwxNiVIpKVkiyTbRFzygeNIRu6GJBj5LkmPjEbTGB_8Ehfem6bTmt7mOxBhaN_CfTo1h9Kf6MAXNAvjcwD_RHC7e">