aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/checks.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 14:34:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-07-30 14:34:21 +0200
commite5c4e2bc5bdc3100399604a462c2d94aaee5ba8e (patch)
tree6f1882ed654265e35e0b689a64530af966f9b2ba /gcc/ada/checks.adb
parentf6bcdb5e058773874be9c63386cdbc3b9ff1581e (diff)
downloadgcc-e5c4e2bc5bdc3100399604a462c2d94aaee5ba8e.zip
gcc-e5c4e2bc5bdc3100399604a462c2d94aaee5ba8e.tar.gz
gcc-e5c4e2bc5bdc3100399604a462c2d94aaee5ba8e.tar.bz2
[multiple changes]
2014-07-30 Jose Ruiz <ruiz@adacore.com> * s-tarest.adb, s-tarest.ads: Fix comments. 2014-07-30 Robert Dewar <dewar@adacore.com> * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb: Change No_Scalar_Parts predicate to Scalar_Part_Present and invert sense of test. This avoids the "not No_xxx" situation which is always ugly. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * inline.adb (Expand_Inlined_Call): When generating code for an internal subprogram the expansion uses the location of the call, so that gdb can skip over it. In GNATprove mode we want to preserve slocs of original subprogram when expanding an inlined call, to obtain better warnings, even though subprogram appears not to come from source if it is the inlining of a subprogram body without a previous spec. 2014-07-30 Eric Botcazou <ebotcazou@adacore.com> * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array types with atomic components. 2014-07-30 Thomas Quinot <quinot@adacore.com> * Make-generated.in: Remove now unnecessary targets after s-oscons reorg. 2014-07-30 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Call): Use ultimate alias of callee when available. 2014-07-30 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): To check whether an expression function is a completion, use the specification of the previous declaration, not its entity, which may be internally generated in an inlined context. From-SVN: r213254
Diffstat (limited to 'gcc/ada/checks.adb')
-rw-r--r--gcc/ada/checks.adb11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index b0538d8..d9a6c9d 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -2402,13 +2402,18 @@ package body Checks is
Nam : Name_Id;
begin
- -- Pick the proper version of 'Valid depending on the type of the
- -- context. If the context is not eligible for such a check, return.
+ -- For scalars, generate 'Valid test
if Is_Scalar_Type (Typ) then
Nam := Name_Valid;
- elsif not No_Scalar_Parts (Typ) then
+
+ -- For any non-scalar with scalar parts, generate 'Valid_Scalars test
+
+ elsif Scalar_Part_Present (Typ) then
Nam := Name_Valid_Scalars;
+
+ -- No test needed for other cases (no scalars to test)
+
else
return;
end if;