memcpy counter stored as an lvalue

It's stored on the stack so the backend doesn't optimise away the
additions. Several issues with the backend are being found, a
refactor is needed.
memcpy test file