The determinations of element abundances in red-giant stars and in particular in AGB stars are reviewed and the resulting abundances are compared with those obtained for planetary nebulae in the Galaxy and in nearby galaxies. The problems, possibilities and implications of such comparisons when estimating yields from low-mass and intermediate-mass stars are illustrated and commented on.