A student gunman died after opening fire at a US school Friday, a police spokesman said.