Can a star cool down enough and become a giant planet?