[Ada] Inlining nonstatic calls to static expression functions

Pierre-Marie de Rodat derodat@adacore.com
Tue Oct 20 07:23:29 GMT 2020


Static expression functions were already effectively inlined in the
case of calls to them with static arguments, but calls with nonstatic
arguments were not generally being inlined, but now they are, as a result
of setting the Has_Pragma_Inline and Is_Inlined flags on such functions.
It appears that it isn't strictly necessary to set the latter flag,
but it still seems reasonable to set it and may be needed in general.

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

gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Mark static
	expression functions as inlined.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 613 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201020/7a8f3098/attachment.bin>


More information about the Gcc-patches mailing list