On RV8xx I believe you can use UAVs to seperate input and output. However RV7xx supports only 1 UAV.
If you care about backward compatibility, you need to seperate the input and output area of the global buffer g, like a ping-pong buffer.
You can also read data from g, manipulate it and store the results back to g, overriding the input.
Besides, you do not necessarily "gather" from g, samplers can also access arbitrary locations.
You do not necessarily have to override the input when using g or uav's. They can both access 4G of memory, so you can place both data segments in the same memory buffer and just offset them. So you would read from offset 0 and write to offset 2M.