Use water containers for only for water, fuel containers only for fuel. It's not a matter of the type of plastic being incompatible with gasoline, it's a matter of health safety. Once you put fuel into a container, the container is contaminated and no longer safe for storing water. Labels on the containers ensure you know what type of liquid is in the container, as well as anyone else (such as emergency personnel.)
I would not recommend you use any container that has held gasoline, to later hold water intended for human consumption.