diff options
author | Marc Poulhiès <poulhies@adacore.com> | 2023-03-22 10:43:07 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-29 10:23:18 +0200 |
commit | 4c33d93bfe8582375d4e56faebb911854517a9f3 (patch) | |
tree | 12169770f92310a47048b6b61909d14ca594fde9 /gcc/ada/contracts.adb | |
parent | 1b19e6abc715c60506efff6bd5c705e727e0e373 (diff) | |
download | gcc-4c33d93bfe8582375d4e56faebb911854517a9f3.zip gcc-4c33d93bfe8582375d4e56faebb911854517a9f3.tar.gz gcc-4c33d93bfe8582375d4e56faebb911854517a9f3.tar.bz2 |
ada: Fix restoration of parent link
When resetting the parent link after having restored the selected
component node, the assertion used was incorrectly triggered when the
traversal hits the members of the parameters association list, as in:
This.Some_Func (Param1, Param2).Dispatching_Call
When restoring the selected component for Dispatching_Call, the
assertion was wrongly triggered when passed Param1 and Param2.
gcc/ada/
* contracts.adb (Restore_Original_Selected_Component): Adjust assertion.
Diffstat (limited to 'gcc/ada/contracts.adb')
-rw-r--r-- | gcc/ada/contracts.adb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ada/contracts.adb b/gcc/ada/contracts.adb index 012ea33..9d02887 100644 --- a/gcc/ada/contracts.adb +++ b/gcc/ada/contracts.adb @@ -4954,7 +4954,8 @@ package body Contracts is begin if Par /= Parent_Node then - pragma Assert (not Is_List_Member (Node)); + pragma Assert (not Is_List_Member (Node) + or else Nkind (Par) = N_Function_Call); Set_Parent (Node, Parent_Node); end if; |