You haven't said if you ran out of gas or the light came on to tell you how low you actually are.
It's very possible your fuel level indicator inside the gas tank has gone bad or something. My legacy has the same problem and the needle will go to E immediately after I fill the tank.......and then the needle will gradually rise as I drive but then drop again for awhile.........strange