  This work is concerned with second-order necessary and sufficient optimality
conditions for optimal control of a non-smooth semilinear elliptic partial
differential equation, where the nonlinearity is the non-smooth max-function
and thus the associated control-to-state operator is in general not
G\^{a}teaux-differentiable. In addition to standing assumptions, two main
hypotheses are imposed. The first one is the G\^{a}teaux-differentiability at
the considered control of the objective functional and it is precisely
characterized by the vanishing of an adjoint state on the active set. The
second one is a structural assumption on the 'almost' active sets, i.e., the
sets of all points at which the values of the interested state are 'close' to
the non-differentiability point of the max-function. We then derive a 'no-gap'
theory of second-order optimality conditions in terms of an abstract curvature
functional, i.e., for which the only change between necessary or sufficient
second-order optimality conditions is between a strict and non strict
inequality.
