Is Ghusl Sufficient for Ablution?

What is the ruling if a person does not intend to perform ablution during the optional ritua ...