aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2021-08-17 10:01:11 -0700
committerPierre-Marie de Rodat <derodat@adacore.com>2021-10-04 08:45:03 +0000
commit935b35674947fe91e204521626c15090621e41ae (patch)
tree7b3e5e2befb947564e05cdf8f45fa7146375b492
parent1d65c80d76996f49fce110ad763a1393a49536f7 (diff)
downloadgcc-935b35674947fe91e204521626c15090621e41ae.zip
gcc-935b35674947fe91e204521626c15090621e41ae.tar.gz
gcc-935b35674947fe91e204521626c15090621e41ae.tar.bz2
[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.
-rw-r--r--gcc/ada/sem_util.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 0c0d34b..70ab0d6 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;