aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-01-23 09:38:15 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2012-01-23 09:38:15 +0100
commit67bdbf1ebd52a2599cae74d4b1b6def861c8c8bc (patch)
tree792053cddb8383795b1faf2619468aa69140dd34 /gcc
parent022d9ce887c7ca3637c597ed81d90d66e23071a1 (diff)
downloadgcc-67bdbf1ebd52a2599cae74d4b1b6def861c8c8bc.zip
gcc-67bdbf1ebd52a2599cae74d4b1b6def861c8c8bc.tar.gz
gcc-67bdbf1ebd52a2599cae74d4b1b6def861c8c8bc.tar.bz2
[multiple changes]
2012-01-23 Robert Dewar <dewar@adacore.com> * sem_ch10.adb, errout.adb: Minor reformatting. 2012-01-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Actuals): An actual in a call to an Ada 2012 Reference function does not lead to a dangerous order dependence. From-SVN: r183409
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/errout.adb6
-rw-r--r--gcc/ada/sem_ch10.adb4
-rw-r--r--gcc/ada/sem_res.adb13
4 files changed, 25 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 0682c64..6104a07 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2012-01-23 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch10.adb, errout.adb: Minor reformatting.
+
+2012-01-23 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Resolve_Actuals): An actual in a call to an
+ Ada 2012 Reference function does not lead to a dangerous order
+ dependence.
+
2012-01-23 Gary Dismukes <dismukes@adacore.com>
* exp_util.adb (Is_Iterated_Container): Test
diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
index 5e3bb4a..b342b75 100644
--- a/gcc/ada/errout.adb
+++ b/gcc/ada/errout.adb
@@ -143,9 +143,9 @@ package body Errout is
-- parameter Suffix, (spec) or (body) is appended after the unit name.
procedure Set_Msg_Node (Node : Node_Id);
- -- Add the sequence of characters for the name associated with the
- -- given node to the current message. For N_Designator, N_Defining_Program_
- -- Unit_Name, N_Selected_Component, and N_Expanded_Name, the Prefix is
+ -- Add the sequence of characters for the name associated with the given
+ -- node to the current message. For N_Designator, N_Selected_Component,
+ -- N_Defining_Program_Unit_Name, and N_Expanded_Name, the Prefix is
-- included as well.
procedure Set_Msg_Text (Text : String; Flag : Source_Ptr);
diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb
index 4d0514d..07dfdf6 100644
--- a/gcc/ada/sem_ch10.adb
+++ b/gcc/ada/sem_ch10.adb
@@ -644,9 +644,7 @@ package body Sem_Ch10 is
-- up not analyzed, it means that the parent did not contain a stub for
-- it, or that there errors were detected in some ancestor.
- if Nkind (Unit_Node) = N_Subunit
- and then not Analyzed (Lib_Unit)
- then
+ if Nkind (Unit_Node) = N_Subunit and then not Analyzed (Lib_Unit) then
Semantics (Lib_Unit);
if not Analyzed (Proper_Body (Unit_Node)) then
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index c25a305..0fecd5b 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -3739,7 +3739,16 @@ package body Sem_Res is
-- Save actual for subsequent check on order dependence, and
-- indicate whether actual is modifiable. For AI05-0144-2.
- Save_Actual (A, Ekind (F) /= E_In_Parameter);
+ -- If this is a call to a reference function that is the result
+ -- of expansion, as in element iterator loops, this does not lead
+ -- to a dangerous order dependence: only subsequent use of the
+ -- denoted element might, in some enclosing call.
+
+ if not Has_Implicit_Dereference (Etype (Nam))
+ or else Comes_From_Source (N)
+ then
+ Save_Actual (A, Ekind (F) /= E_In_Parameter);
+ end if;
-- For mode IN, if actual is an entity, and the type of the formal
-- has warnings suppressed, then we reset Never_Set_In_Source for