From 935b35674947fe91e204521626c15090621e41ae Mon Sep 17 00:00:00 2001 From: Steve Baird Date: Tue, 17 Aug 2021 10:01:11 -0700 Subject: [PATCH] [Ada] Fix compiler internal error gcc/ada/ * sem_util.adb (Is_Repeatedly_Evaluated): Handle the case of an Old attribute reference that occurs within what was originally a quantified expression but which expansion has transformed into an Expression_With_Actions. --- gcc/ada/sem_util.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 0c0d34ba6b0c..70ab0d6d91da 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -31510,7 +31510,12 @@ package body Sem_Util is -- quantified_expression. if Nkind (Par) = N_Quantified_Expression - and then Trailer = Condition (Par) + and then Trailer = Condition (Par) + then + return True; + elsif Nkind (Par) = N_Expression_With_Actions + and then + Nkind (Original_Node (Par)) = N_Quantified_Expression then return True; end if; -- 2.47.2