The following input
```
void function(int) a;
void function(int) b;
void main()
{
const c = *a == *b;
// assert(*a); // rejected during sema
}
```
crashes dmd in the backend:
> TYD func
>
> Program received signal SIGILL, Illegal instruction.
> 0x00005555559d1756 in dmd.backend.cod3.jmpopcode(dmd.backend.el.elem*) ()
I think however that the program is semantically invalid and should be rejected during exp-semantics, just like the commented assertion is.
Comment #1 by b2.temp — 2024-11-25T19:46:36Z
Seems to happen only with `is`, comparisons, and relationals operators.
Comment #2 by b2.temp — 2024-11-29T09:27:47Z
LDC2 crashes too since v1.35. Previously it generated bad code for `c` (see https://godbolt.org/z/cEM1MEevE), i.e `true` whatever the functions were pointing to.
Comment #3 by robert.schadek — 2024-12-13T19:38:46Z