Machine gun is a noun phrase that is defined as a weapon that fires bullets rapidly as long as the trigger is held down. When hyphenated, as machine-gun, the word becomes an adjective used to describe things that happen very quickly. Machine-gun can also be a verb, to shoot something with a machine gun.
However, in practice, the common spelling is machine gun for both verb and adjective forms.
Examples
A policewoman was under investigation today after her machine gun went off while she was unloading it at Mong Kok police station. [South China Morning Post]
As a result, a generation from a single place could be laid to waste in a burst of machine gun fire. [Telegraph]
On his Facebook page, Oestrike’s main photo shows a cartoon character holding a gun and with a machine gun feed around her neck. [Grand Rapids Press]
An essential gadget: the machine-gun water pistol. [CNET]