Higher-order necessary optimality conditions for a nonsmooth extremum problem