A phase transition occurring in the inner core of a neutron star could be associated with a density discontinuity that would affect the frequency spectrum of the non-radial oscillation modes in two ways. First, it would produce a softening of the equation of state, leading to more compact equilibrium configurations and changing the frequency of the fundamental and pressure modes of the neutron star. Secondly, a new non-zero frequency g mode would appear, associated with each discontinuity. These discontinuity g modes have typical frequencies larger than those of g modes previously studied in the literature (thermal, core g modes or g modes caused by chemical inhomogeneities in the outer layers), and smaller than that of the fundamental mode; therefore they should be distinguishable from the other modes of non-radial oscillation. In this paper we investigate how high-density discontinuities change the frequency spectrum of the non-radial oscillations, within the framework of the general relativistic theory of stellar perturbations. Our purpose is to understand whether a gravitational signal, emitted at the frequencies of the quasi-normal modes, may give some clear information on the equation of state of the neutron star and, in particular, on the parameters that characterize the density discontinuity. We discuss some astrophysical processes that may be associated with the excitation of these modes, and estimate how much gravitational energy should the modes convey to produce a signal detectable by high-frequency gravitational detectors.