  We investigate a unique type of zero-index medium with both gain and loss
(ZIMGL), whose effective permittivity and permeability are purely imaginary and
of opposite signs. We show analytically that, by using a slab of ZIM-GL with
equal magnitude of loss and gain, coherent perfect absorber (CPA) and laser,
i.e. the socalled CPA-laser, can be achieved simultaneously. CPA-laser has been
found previously in parity-time (PT) symmetric systems. However, the underlying
physics in a PT-symmetric system is distinct from that in a ZIM-GL. By
designing a photonic crystal (PC) composed of core-shell rods, with loss and
gain distributed in either the core or the shell, we have realized such a
ZIM-GL. The CPA-laser functionality of such a PC is also confirmed in our
numerical simulations. Our work provides a different approach for simultaneous
realization of CPA and laser besides PTsymmetric systems.
