aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_attr.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-08-22 14:13:14 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-22 14:13:14 +0200
commit1dcdbfab317af110a083a43e932d00f3dcdc742d (patch)
treecdb8b5b456fe8e12f7e903b0952abeeeea6633c0 /gcc/ada/exp_attr.adb
parent597d7158c66a05d0324c54c6dbaafb999f049301 (diff)
downloadgcc-1dcdbfab317af110a083a43e932d00f3dcdc742d.zip
gcc-1dcdbfab317af110a083a43e932d00f3dcdc742d.tar.gz
gcc-1dcdbfab317af110a083a43e932d00f3dcdc742d.tar.bz2
2008-08-22 Robert Dewar <dewar@adacore.com>
* exp_attr.adb: (Expand_N_Attribute_Reference): No validity checking on OUT parameter of Read or Input attribute. From-SVN: r139443
Diffstat (limited to 'gcc/ada/exp_attr.adb')
-rw-r--r--gcc/ada/exp_attr.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb
index f511178..04e7a0b 100644
--- a/gcc/ada/exp_attr.adb
+++ b/gcc/ada/exp_attr.adb
@@ -607,10 +607,14 @@ package body Exp_Attr is
begin
-- Do required validity checking, if enabled. Do not apply check to
-- output parameters of an Asm instruction, since the value of this
- -- is not set till after the attribute has been elaborated.
+ -- is not set till after the attribute has been elaborated, and do
+ -- not apply the check to the arguments of a 'Read or 'Input attribute
+ -- reference since the scalar argument is an OUT scalar.
if Validity_Checks_On and then Validity_Check_Operands
and then Id /= Attribute_Asm_Output
+ and then Id /= Attribute_Read
+ and then Id /= Attribute_Input
then
declare
Expr : Node_Id;