aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:45:27 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 11:45:27 +0200
commit38afef28a3c5af53e3c4e582f8a071f2dca91618 (patch)
tree20e2d444c0696d09f6e8ef992b4bc959dce87426 /gcc/ada/checks.adb
parenteafedef3836563374ab1c4509e2a386c8156af7f (diff)
downloadgcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.zip
gcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.tar.gz
gcc-38afef28a3c5af53e3c4e582f8a071f2dca91618.tar.bz2
[multiple changes]
2010-09-10 Emmanuel Briot <briot@adacore.com> * prj-util.adb (Executable_Of): Fix CE when the project does not contain a Builder package. 2010-09-10 Vincent Celier <celier@adacore.com> * prj-ext.adb (Initialize_Project_Path): Add <prefix>/lib/gpr/<target> to the project path, if Prefix and Target_Name are defined. * prj-tree.ads (Project_Node_Tree_Data): New component Target_Name 2010-09-10 Ed Schonberg <schonberg@adacore.com> * checks.adb (Ensure_Valid): If the expression is a boolean expression or short-circuit operation, do no emit a validity check: only the elementary operands of the expression need checking. 2010-09-10 Ben Brosgol <brosgol@adacore.com> * gnat_rm.texi: Document Short_Descriptors. 2010-09-10 Arnaud Charlet <charlet@adacore.com> * s-taprop-linux.adb, s-taskin.ads (Task_Alternate_Stack): Default initialize to Null_Address. (Enter_Task): Do not set up an alternate stack for foreign threads. From-SVN: r164149
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index 2921260..9b10f12 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -4108,6 +4108,17 @@ package body Checks is
end if;
end if;
+ -- If this is a boolean expression, only its elementary consituents
+ -- need checking: if they are valid, a boolean or short-circuit
+ -- operation with them will be valid as well.
+
+ if Base_Type (Typ) = Standard_Boolean
+ and then
+ (Nkind (Expr) in N_Op or else Nkind (Expr) in N_Short_Circuit)
+ then
+ return;
+ end if;
+
-- If we fall through, a validity check is required
Insert_Valid_Check (Expr);