  Although the physical origin of gamma-ray burst (GRB) prompt emission is
still controversial, synchrotron radiation from accelerated electrons is a
promising mechanism. It is believed that electrons are accelerated continuously
by ultra-relativistic shocks or magnetic reconnections. At the same time, these
electrons will be cooled via several processes (mainly adiabatic expansion,
synchrotron radiation and inverse Compton scattering (ICS)), which regulate the
distribution of electrons. An extra high-energy spectrum component is expected
to be induced by ICS. However, the gamma-gamma annihilation effect may
eliminate the high-energy photons and prevent the observers from distinguishing
the extra component. We perform numerical calculations by taking these effects
into account and discuss whether the extra ICS component could be observed. By
exploring the plausible parameter space for relevant quantities of the GRB
ejecta, we present the electron distributions and the corresponding spectra of
synchrotron radiation and ICS. It is found that the extra component is
observable only for ejecta with a rather large bulk Lorentz factor. A large
Lorentz factor means the adiabatic expansion is the leading process in the
electron cooling procedure, which makes the low-energy electron distribution
spectrum to be relatively hard. Therefore the ICS component is more likely to
be detected for GRBs that have a hard low-energy photon spectrum.
