From: Eric Botcazou Date: Tue, 26 May 2020 18:06:14 +0000 (+0200) Subject: [Ada] Fix crash on quantified expression in expression function (2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e0cd875b5c5911200543044f855843afb93bf67;p=gcc.git [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. --- 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;