Global array doesn't get assigned the space it would take up in memory
There is no problem here. Only the compiler is a bit smarter than you anticipated. It sees, that you are not using arr anywhere, so it just optimizes it out.
There are two ways to prevent that, if you really want to:

I think you can use flags to tell the compiler, that this shouldn't be optimized out. I'm no expert in this, others might know more about this and add their own answer
You can just start using it.