  Cosmic rays produced in cluster accretion and merger shocks provide pressure
to the intracluster medium (ICM) and affect the mass estimates of galaxy
clusters. Although direct evidence for cosmic-ray ions in the ICM is still
lacking, they produce gamma-ray emission through the decay of neutral pions
produced in their collisions with ICM nucleons. We investigate the capability
of the Gamma-ray Large Area Space Telescope (GLAST) and imaging atmospheric
Cerenkov telescopes (IACTs) for constraining the cosmic-ray pressure
contribution to the ICM. We show that GLAST can be used to place stringent
upper limits, a few per cent for individual nearby rich clusters, on the ratio
of pressures of the cosmic rays and thermal gas. We further show that it is
possible to place tight (<~10%) constraints for distant (z <~ 0.25) clusters in
the case of hard spectrum, by stacking signals from samples of known clusters.
The GLAST limits could be made more precise with the constraint on the
cosmic-ray spectrum potentially provided by IACTs. Future gamma-ray
observations of clusters can constrain the evolution of cosmic-ray energy
density, which would have important implications for cosmological tests with
upcoming X-ray and Sunyaev-Zel'dovich effect cluster surveys.
