ยง why is int i = i allowed in C++?

This bizarre program:
struct Foo { explicit Foo() {}; }
int main() { Foo foo = foo; cout << "works!"; return 0; }
actually works! Why is this allowed? The only real use-case I know for this is to write:
const int ARRSIZE = 200;
int *ptr = malloc(sizeof(ptr) * ARRSIZE);
Still, this seems awfully dodgy. It feels like the C speficiation could allow the use of the left-hand-side name in expression that only need type information while emitting compile time errors for expressions that use the left-hand-side-name as a value.