Phase diagram of QCD with four degenerate quarks