This is termed protandry.