[Ada] Bug in Enum_Subtype'Image in Ada 2020 mode

Pierre-Marie de Rodat derodat@adacore.com
Mon Jul 27 08:05:52 GMT 2020


This patch fixes a bug in which Enum_Subtype'Image, where Enum_Subtype
is a non-first subtype of an enumeration type, would return the image of
the 'Pos -- that is, an integer instead of the text of the enumeration
literal.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* exp_imgv.adb (Expand_Image_Attribute): Add Root_Type, so
	constrained subtypes work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 386 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200727/6da2f174/attachment-0001.bin>


More information about the Gcc-patches mailing list