https://gcc.gnu.org/g:c9c6392fcbc96d2df388fc72ae15d564da2e74ad
commit r15-9906-gc9c6392fcbc96d2df388fc72ae15d564da2e74ad Author: Ronan Desplanques <desplanq...@adacore.com> Date: Mon Jun 2 12:09:59 2025 +0200 ada: Fix assertion failure on finalizable aggregate The Finalizable aspect makes it possible that Insert_Actions_In_Scope_Around is entered with an empty list of after actions. This patch fixes a condition that was not quite right in this case. gcc/ada/ChangeLog: * exp_ch7.adb (Insert_Actions_In_Scope_Around): Fix condition. Diff: --- gcc/ada/exp_ch7.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 4d2b8348048e..381294b05d61 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -5460,7 +5460,7 @@ package body Exp_Ch7 is -- Finalization calls are inserted after the target - if Present (Act_After) then + if Is_Non_Empty_List (Act_After) then Last_Obj := Last (Act_After); Insert_List_After (Target, Act_After); else