Routine [Set_]Generic_Parent can only be called on package, function and procedure specification nodes, as asserted in their bodies. It would crash when called for renaming or object declarations; the comment was most likely referring to some earlier implemenation idea.
Tested on x86_64-pc-linux-gnu, committed on trunk 2017-10-14 Piotr Trojanek <troja...@adacore.com> * sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
Index: sinfo.ads =================================================================== --- sinfo.ads (revision 253753) +++ sinfo.ads (working copy) @@ -1472,10 +1472,7 @@ -- Generic_Parent (Node5-Sem) -- Generic_Parent is defined on declaration nodes that are instances. The -- value of Generic_Parent is the generic entity from which the instance - -- is obtained. Generic_Parent is also defined for the renaming - -- declarations and object declarations created for the actuals in an - -- instantiation. The generic parent of such a declaration is the - -- corresponding generic association in the Instantiation node. + -- is obtained. -- Generic_Parent_Type (Node4-Sem) -- Generic_Parent_Type is defined on Subtype_Declaration nodes for the