[Ada] Force evaluation of operator calls in renamings

Pierre-Marie de Rodat derodat@adacore.com
Tue Jun 16 13:07:45 GMT 2020


When renaming a qualified expression with an operator, e.g.:

   Y : Boolean renames Boolean'(not X);

routine Evaluate_Name should handle operators just like it handles
function calls. This doesn't appear to matter for GNAT (where this
routine is called in very few cases, as described in the comment for
Evaluation_Required), but is critical for GNATprove (where the lack of a
forced evaluation triggers might cause a soundness bug).

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

2020-06-16  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_util.adb (Evaluate_Name): Force evaluation of operators.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 1293 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20200616/eb7c1a87/attachment-0001.bin>


More information about the Gcc-patches mailing list