summaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-25 08:07:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2017-04-25 08:07:38 +0000
commita85cd3ab950b2383cb036a9587049b13c1099a05 (patch)
treef8c6c93a6bf4164317376630f72b4e12aef4e5d1 /gcc/ada/checks.adb
parent9ad76a2c1236d74a62aa67f5a6d4a80c7ef02f7f (diff)
downloadgcc-a85cd3ab950b2383cb036a9587049b13c1099a05.tar.gz
2017-04-25 Tristan Gingold <gingold@adacore.com>
* s-mmap.ads (Data): Add pragma Inline. 2017-04-25 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Insert_Valid_Check): Do not use a renaming to alias a volatile name because this will lead to multiple evaluations of the volatile name. Use a constant to capture the value instead. 2017-04-25 Doug Rupp <rupp@adacore.com> * init.c [VxWorks Section]: Disable sigtramp for ppc64-vx7. 2017-04-25 Ed Schonberg <schonberg@adacore.com> * exp_util.adb, exp_util.ads (Build_Class_Wide_Expression): Add out parameter to indicate to caller that a wrapper must be constructed for an inherited primitive whose inherited pre/postcondition has called to overridden primitives. * freeze.adb (Check_Inherited_Conditions): Build wrapper body for inherited primitive that requires it. * sem_disp.adb (Check_Dispatching_Operation): Such wrappers are legal primitive operations and belong to the list of bodies generated after the freeze point of a type. * sem_prag.adb (Build_Pragma_Check_Equivalent): Use new signature of Build_Class_Wide_Expression. * sem_util.adb, sem_util.ads (Build_Overriding_Spec): New procedure to construct the specification of the wrapper subprogram created for an inherited operation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247140 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index f0ba9a8ad9e..40d3f3cefd7 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -7210,17 +7210,18 @@ package body Checks is
end if;
-- Build the prefix for the 'Valid call. If the expression denotes
- -- a name, use a renaming to alias it, otherwise use a constant to
- -- capture the value of the expression.
+ -- a non-volatile name, use a renaming to alias it, otherwise use a
+ -- constant to capture the value of the expression.
- -- Temp : ... renames Expr; -- reference to a name
+ -- Temp : ... renames Expr; -- non-volatile name
-- Temp : constant ... := Expr; -- all other cases
PV :=
Duplicate_Subexpr_No_Checks
(Exp => Exp,
Name_Req => False,
- Renaming_Req => Is_Name_Reference (Exp),
+ Renaming_Req =>
+ Is_Name_Reference (Exp) and then not Is_Volatile (Typ),
Related_Id => Related_Id,
Is_Low_Bound => Is_Low_Bound,
Is_High_Bound => Is_High_Bound);