From: Viljar Indus <in...@adacore.com> gcc/ada/ChangeLog:
* errout.adb (Remove_Warning_Messages): Mark removed messages as deleted. * erroutc.adb (Purge_Messages): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/errout.adb | 2 ++ gcc/ada/erroutc.adb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 2554d5895b3..5ba44a21d21 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -3364,6 +3364,8 @@ package body Errout is E := First_Error_Msg; while E /= No_Error_Msg loop while To_Be_Removed (Errors.Table (E).Next) loop + Errors.Table (Errors.Table (E).Next).Deleted := True; + Errors.Table (E).Next := Errors.Table (Errors.Table (E).Next).Next; diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 707851ac6a7..26095520fa1 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -1332,6 +1332,8 @@ package body Erroutc is E := First_Error_Msg; while E /= No_Error_Msg loop while To_Be_Purged (Errors.Table (E).Next) loop + Errors.Table (Errors.Table (E).Next).Deleted := True; + Errors.Table (E).Next := Errors.Table (Errors.Table (E).Next).Next; end loop; -- 2.43.0