The change is allowed, so no bug.
The change does not happen always, but it does happen often, and it can happen at any time (any setLength). It can happen at different times, if you run the same code twice
setLength allocates memory for either exact, or sometimes a few extra elements. (depends on various factors, and may change with fpc versions).
If there had been extra mem, then no change of address occurs (but there is no way to know when this is. So you can not use this)
Otherwise the entire array is moved to a new location. This is because the array must always be one continuous block of mem.
-----------
The question is, why you need the pointer, why not use a[0] ?