A simpler version of that is:
```d
void foo(int* p)
{
if (p == null)
*p = 3;
}
```
which I keep thinking I should implement in the optimizer.
```
void foo()
{
int* p = null;
*p = 3;
}
```
already yields from the compiler:
```
Error: null dereference in function _D5test23fooFZv
```
when compiled with -O