On T x G, where T is a compact real-analytic manifold and G is a compact Lie group, we consider differential operators P which are invariant by left translations on G and are elliptic in T. Under a mild technical condition, we prove that global hypoellipticity of P implies its global analytic-hypoellipticity (actually Gevrey of any order s >= 1). We also study the connection between the latter property and the notion of global analytic (resp. Gevrey) solvability, but in a much more general setup.