The consequences would be unpleasant; at the very least, the elevator would stop responding to requests to move to another floor (such as when an attempt is made to call the elevator or when someone is inside and presses the floor buttons). If other parts of the program need memory (a part assigned to open and close the door, for example), then nobody would be able to enter, and if someone happens to be inside, they will become trapped (assuming the doors cannot be opened manually).