In the above example y is obviously not a compile-time constant because the value of y is not known when the program is compiled. It depends on what value is passed to the function.
The code that follows (imagine there is more code where the dots are) can read the value of y but it cannot modify it.