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 --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 4d2b834..381294b 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -5460,7 +5460,7 @@
-- 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