ada: Fix different 'Img and 'Image on enumeration type with Put_Image

As documented in the GNAT RM, 'Img should behave like 'Image for objects.
The change fixes the problem and also implements more aggressive folding.

gcc/ada/ChangeLog:

	* sem_attr.adb: Add with and use clauses for Exp_Put_Image.
	(Eval_Attribute.Fold_Compile_Time_Known_Enumeration_Image): New
	procedure factored out from....
	(Eval_Attribute): ...here.  Attempt to fold 'Img and 'Image for all
	compile-time known values of enumeration, but not character, types,
	provided that Put_Image need not be called, by invoking the nested
	Fold_Compile_Time_Known_Enumeration_Image procedure on the value.
1 file changed