summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch5.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 12:05:48 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-20 12:05:48 +0000
commit28191f15175e64d2a5cc2e542a46ae2271e428ce (patch)
treee2488e4fa1bdad3c7f323f40b81091562c736f8b /gcc/ada/sem_ch5.adb
parentea6969d45aca81bda2436c944d4de1f4353cf756 (diff)
downloadgcc-28191f15175e64d2a5cc2e542a46ae2271e428ce.tar.gz
2015-10-20 Yannick Moy <moy@adacore.com>
* exp_ch9.adb (Expand_Entry_Barrier): Default initialize local variable Func. 2015-10-20 Jerome Lambourg <lambourg@adacore.com> * init.c (__gnat_error_handler for vxworks): Force SPE bit in the MSR when handling signals 2015-10-20 Arnaud Charlet <charlet@adacore.com> * einfo.ads, sem_ch12.adb, sem_ch6.adb, table.ads, s-stposu.ads, g-table.ads, g-dyntab.ads, makeutl.ads, a-crdlli.ads: Fix typos. 2015-10-20 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): Element iterators over multidimensional arrays create additional loops during expansion. For such loops we create a label as a scope name. Attach this label properly to tree, for use in GNATProve over such element iterators. * sem_attr.adb (Analyze_Attribute, case Loop_Entry): The loop to which the attribute applies comes from source, not from expansion of an element iterator or a quantified expression. * exp_attr.adb (Expand_N_Attribute_Reference): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r--gcc/ada/sem_ch5.adb7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index 4f60c96acda..d340b8f385a 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -3215,12 +3215,15 @@ package body Sem_Ch5 is
end if;
end if;
- -- Case of no identifier present
+ -- Case of no identifier present. Create one and attach it to the
+ -- loop statement for use as a scope and as a reference for later
+ -- expansions. Indicate that the label does not come from source.
else
Ent := New_Internal_Entity (E_Loop, Current_Scope, Loc, 'L');
Set_Etype (Ent, Standard_Void_Type);
- Set_Parent (Ent, N);
+ Set_Identifier (N, New_Occurrence_Of (Ent, Loc));
+ Set_Has_Created_Identifier (N);
end if;
-- Iteration over a container in Ada 2012 involves the creation of a