https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125502
liu zhenyu <lzy20000419 at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lzy20000419 at outlook dot com
--- Comment #10 from liu zhenyu <lzy20000419 at outlook dot com> ---
The fix for PR125502 (`optimize_vector_load`, `SSA_NAME_OCCURS_IN_ABNORMAL_PHI`
on the use's lhs) does not
cover the complex-load rewrite in the same pass. That path still ICEs on trunk:
```c
#include <setjmp.h>
jmp_buf jb;
void use (double);
void g (_Complex double *p)
{
double r = 0;
_Complex double c = *p;
setjmp (jb);
use (r);
r = __real__ c;
use (r);
}
```
```
$ gcc -O1 -c t.c
Unable to coalesce ssa_names 2 and 9 which are marked as MUST COALESCE.
r_2(ab) and r_9(ab)
during RTL pass: expand
internal compiler error: SSA corruption
```
Fails at `-O1` and above from GCC 5 through trunk (4.9 OK).
`-fno-tree-forwprop` avoids it. forwprop moves
`r = REALPART_EXPR <c>` to the load site without checking that `r` occurs in an
abnormal PHI, so the new
`r_11(ab)` overlaps the setjmp PHI. The same `SSA_NAME_OCCURS_IN_ABNORMAL_PHI`
guard on the use lhs would
cover it.
Disclaimer: This test case was generated by a fuzzer, and the report was
written with LLM assistance.