[Ada] Fix violation of No_Implicit_Loops restriction for enumeration type

Pierre-Marie de Rodat derodat@adacore.com
Thu Jul 8 13:50:25 GMT 2021


The perfect hash function generated by the compiler to speed up the Value
attribute of an enumeration type contains an implicit loop and, therefore,
violates the No_Implicit_Loops restriction when it is active.

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

gcc/ada/

	* exp_imgv.adb: Add with and use clause for Restrict and Rident.
	(Build_Enumeration_Image_Tables): Do not generate the hash function
	if the No_Implicit_Loops restriction is active.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1858 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210708/1ae9e990/attachment.bin>


More information about the Gcc-patches mailing list