From 9e0cd875b5c5911200543044f855843afb93bf67 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Tue, 26 May 2020 20:06:14 +0200 Subject: [PATCH] [Ada] Fix crash on quantified expression in expression function (2) gcc/ada/ * freeze.adb (Freeze_Expr_Types): Replace call to Find_Aspect with call to Find_Value_Of_Aspect and adjust accordingly. --- gcc/ada/freeze.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 6620ae3da30..65377ca36a8 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -8000,10 +8000,11 @@ package body Freeze is then declare Iter : constant Node_Id := - Find_Aspect (Etype (Node), Aspect_Default_Iterator); + Find_Value_Of_Aspect (Etype (Node), Aspect_Default_Iterator); + begin if Present (Iter) then - Check_And_Freeze_Type (Etype (Expression (Iter))); + Check_And_Freeze_Type (Etype (Iter)); end if; end; end if; -- 2.30.2