summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 9c6955a7b9e..2a2b7dde4bb 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -3639,9 +3639,13 @@ package body Exp_Ch7 is
-- If the node to wrap is an iteration_scheme, the expression is
-- one of the bounds, and the expansion will make an explicit
-- declaration for it (see Analyze_Iteration_Scheme, sem_ch5.adb),
- -- so do not apply any transformations here.
+ -- so do not apply any transformations here. Same for an Ada 2012
+ -- iterator specification, where a block is created for the expression
+ -- that build the container.
- elsif Nkind (Wrap_Node) = N_Iteration_Scheme then
+ elsif Nkind (Wrap_Node) = N_Iteration_Scheme
+ or else Nkind (Wrap_Node) = N_Iterator_Specification
+ then
null;
-- In formal verification mode, if the node to wrap is a pragma check,