[Ada] Fix bug in casing on composite values with -gnatX

Pierre-Marie de Rodat derodat@adacore.com
Tue Jul 6 14:48:40 GMT 2021


Fix a bug (which shows up as an assertion failure in gigi) having to
do with the tree generated by the FE for a record-valued case-statement
choice that has a subcomponent of an enumeration type.

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

gcc/ada/

	* exp_ch5.adb
	(Expand_N_Case_Statement.Expand_General_Case_Statement.Pattern_Match):
	When generating an equality test for a statically known discrete
	value, only generate the numeric value if the discrete type is
	not an enumeration type.  If it is an enumeration type, then
	call Get_Enum_Lit_From_Pos instead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 982 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210706/95a46231/attachment.bin>


More information about the Gcc-patches mailing list