diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 10:07:38 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 10:07:38 +0200 |
commit | a187206c1450fc02d7a466b372c073b67f41c26b (patch) | |
tree | f8c6c93a6bf4164317376630f72b4e12aef4e5d1 /gcc/ada/checks.adb | |
parent | 15fc8cb7ee426fe6730b742a7fecf05ba0082d87 (diff) | |
download | gcc-a187206c1450fc02d7a466b372c073b67f41c26b.zip gcc-a187206c1450fc02d7a466b372c073b67f41c26b.tar.gz gcc-a187206c1450fc02d7a466b372c073b67f41c26b.tar.bz2 |
[multiple changes]
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.
From-SVN: r247140
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r-- | gcc/ada/checks.adb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index f0ba9a8..40d3f3c 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); |