In recent years, much concern has been raised about automatic parking systems for passenger vehicles. However, most of the researches are based on kinematic model, where the lateral and yaw dynamics is not taken into account. This paper proposes a real-time optimization approach to the parallel-parking control problem, focusing on the lateral and yaw dynamics. It should be noted that the parallel parking problem incorporating such dynamics is difficult to solve numerically/analytically. First, we formulate the parallel parking problem as a control problem in a descriptor form. Then, by introducing a new idea, we transform the control problem into a kind of constrained optimal control problem, to which the real-time optimization method is applicable. Finally, a numerical simulation is demonstrated to illustrate the effectiveness of our proposed approach.