No, not in context of most likely question you ask.
If the 529 was held by a 501c3 you could roll the stocks thru the 501c3 and thus avoid gains where your were making a donation. But as posted by others, you funds 529s only with cash.
You might roll a regular gift thru an intermediate donor with a lower tax bracket but you'd need to pay attention to kiddie tax rules if it was a kids under 18.