[Ada] Remove range check generation code in gigi
Eric Botcazou
ebotcazou@adacore.com
Fri Aug 30 14:07:00 GMT 2019
The generation of range checks is now entirely done by the front-end proper so
the code to that effect in gigi is obsolete and can be removed, but the patch
implements a watchdog mechanism to make sure no check is lost in the process.
Tested on x86_64-suse-linux, applied on the mainline.
2019-08-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gigi_checking_assert): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
Remove redundant test and adjust comments. Minor tweaks.
* gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
instead assert that the Do_Range_Check flag is not set. Adjust call
to convert_with_check.
(gnat_to_gnu): Likewise.
(assoc_to_constructor): Likewise.
(pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter.
(emit_range_check): Delete.
(convert_with_check): Remove RANGE_P parameter and adjust. Do a single
overflow check for modular types.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 19558 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190830/be00dd6a/attachment.bin>
More information about the Gcc-patches
mailing list