This paper presents a trust region algorithm for solving the following problem. Minimize $\phi (x) = f(x) + h(c(x))$ over $x \in R^n $, where f and c are smooth functions and h is a polyhedral convex function. Problems of this form include various important applications such as min-max optimization, Chebyshev approximation, and minimization of exact penalty functions in nonlinear programming. The algorithm is an adaptation of a recently proposed successive quadratic programming method for nonlinear programming and makes use of the second-order approximations to both f and c in order to avoid the Maratos effect. It is proved under appropriate assumptions that the algorithm is globally and quadratically convergent to a solution of the problem. Some numerical results exhibiting the effectiveness of the algorithm are also reported.