[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
This commit is contained in:
Arnaud Charlet 2012-01-23 09:38:15 +01:00
parent 022d9ce887
commit 67bdbf1ebd
4 changed files with 25 additions and 8 deletions

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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