I watched a movie sometime in the early to mid 1970’s where a person (I think a man) was stuck in a hotel (or possibly a casino). He kept going down to the lobby, where there were other people. When someone’s name/or number was called, they could leave the hotel. This person kept wondering why his number was never being called. He later found out he was actually dead, and that’s why he was unable to leave.
“Moonchild” (1974)?
https://www.imdb.com/title/tt0071855/?ref_=nv_sr_2