[Ada] Use type conversion when inlining may trigger a run-time check
Pierre-Marie de Rodat
derodat@adacore.com
Mon May 21 15:04:00 GMT 2018
In the frontend inlining used in GNATprove, inlining of a return statement
was using an unchecked type conversion, which could cause a necessary
run-time check on the conversion to be skipped. Now fixed.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-05-21 Yannick Moy <moy@adacore.com>
gcc/ada/
* inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
conversion instead of an unchecked type conversion when inlining a
return statement, unless type qualification is required (for character
and string literal) or no check can result from the conversion (for
access types).
* opt.ads: Update comment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 3216 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180521/63ab0ecb/attachment.bin>
More information about the Gcc-patches
mailing list