[Ada] Prevent In_Check_Node routine from going too far in the parent chain

Pierre-Marie de Rodat derodat@adacore.com
Thu Dec 17 10:50:08 GMT 2020


Routines that examine the parent chain of a subexpression don't need to
cross the subprogram or package boundaries and go until the very root of
the compilation unit.

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

gcc/ada/

	* sem_util.adb (In_Check_Node): Add guard and rename Node to
	Par, just like it is done in surrounding routines, e.g.
	In_Assertion_Expression_Pragma and In_Generic_Formal_Package.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 827 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201217/d581a06c/attachment.bin>


More information about the Gcc-patches mailing list