From cc744c0c238975146980db13facb0307f4d73968 Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Thu, 10 Sep 2020 11:49:50 -0400 Subject: [PATCH] [Ada] Delete: set Position to No_Element gcc/ada/ * libgnat/a-cihama.adb, libgnat/a-cohama.adb, libgnat/a-cohase.adb (Delete): Set Position.Position, and assert. --- gcc/ada/libgnat/a-cihama.adb | 2 ++ gcc/ada/libgnat/a-cohama.adb | 2 ++ gcc/ada/libgnat/a-cohase.adb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/gcc/ada/libgnat/a-cihama.adb b/gcc/ada/libgnat/a-cihama.adb index 64f662f332b..7a490d545cd 100644 --- a/gcc/ada/libgnat/a-cihama.adb +++ b/gcc/ada/libgnat/a-cihama.adb @@ -349,6 +349,8 @@ is Free (Position.Node); Position.Container := null; + Position.Position := No_Element.Position; + pragma Assert (Position = No_Element); end Delete; ------------- diff --git a/gcc/ada/libgnat/a-cohama.adb b/gcc/ada/libgnat/a-cohama.adb index 1475330693d..9c4e51a6392 100644 --- a/gcc/ada/libgnat/a-cohama.adb +++ b/gcc/ada/libgnat/a-cohama.adb @@ -336,6 +336,8 @@ is Free (Position.Node); Position.Container := null; + Position.Position := No_Element.Position; + pragma Assert (Position = No_Element); end Delete; ------------- diff --git a/gcc/ada/libgnat/a-cohase.adb b/gcc/ada/libgnat/a-cohase.adb index 63e44e12790..0131f73eb7a 100644 --- a/gcc/ada/libgnat/a-cohase.adb +++ b/gcc/ada/libgnat/a-cohase.adb @@ -319,6 +319,8 @@ is Free (Position.Node); Position.Container := null; + Position.Position := No_Element.Position; + pragma Assert (Position = No_Element); end Delete; ---------------- -- 2.30.2