A new compact rotating gantry for carbon-ion radiotherapy is being designed. This gantry consists of three combined-function superconducting-magnets having a bending angle of 90 degrees. The dipole field of the superconducting magnets is designed to be Bmax=5.02 T, corresponding to a bending radius of 1.32 m for transporting carbon ions having kinetic energy of 430 MeV/u. This superconducting magnet also has three independent super-conducting quadrupole-coils, which are to be wound inside of the dipole coil for beam focusing. The dipole and quadrupole coils are to be electrically isolated in the magnet, and connected to independent power supplies, so that each field component can be independently excited. Having used the combined-function superconducting magnets, the size of the rotating gantry would become very compact; the length and radius are 5.1 m and 4.0 m, respectively. The magnetic field distributions of the super-conducting magnets were calculated with a three-dimensional electromagnetic field solver, Opera-3d code. With the calculated fields, the superconducting coils were optimized, so as to obtain uniform field distributions. In this paper, the design of the beam optics as well as the superconducting magnets is presented.