Tom Hanks has been looking fit and trim while promoting his latest film, “Captain Phillips.” But the star revealed to David Letterman on Monday that’s he’s suffering from a serious health problem.

“I went to the doctor and he said, ‘You know those high blood sugar numbers you’ve been dealing with since you were 36?,’” Hanks said on “Late Show With David Letterman.” “’Well, you graduated! You’ve got Type 2 diabetes, young man.’”

Hanks, 57, has a history of gaining and losing weight for Hollywood role. He reportedly packed on 30 pounds to play a beleaguered baseball manager in 1992’s “A League of Their Own.” He then lost more than 50 pounds for the 2000 island adventure, “Cast Away.”

Hanks’ yo-yoing weight could have played a part in the disease’s development, according to an expert. But Hanks said that his condition is controllable by watching his diet.

The actor joked to Letterman, “My doctor said, ‘If you can weigh as much as you weighed in high school… you will essentially be completely healthy… you will not have Type 2 diabetes.’ And then I said to her, ‘Well, I’m gonna have Type 2 diabetes. Because there is no way I can weigh as much as I did in high school.'”

“What did you weigh in high school?” Letterman asked.

“I weighed 96-pounds in high school,” Hanks shot back.

CBS News’ Dr. Holly Phillips said of Hanks’ revelation: “In dramatic weight gain and dramatic weight loss, the equilibrium of the body is just completely off. So that might predispose him to developing Type 2 diabetes later.” She added, “He’ll have to watch what he eats very closely… he’ll need to exercise regularly but there’s no reason he can’t live a perfectly normal life.”