diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-26 14:26:11 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-26 14:26:11 +0100 |
commit | a2c314c72b070a170ade9858c6a0ece2105c4508 (patch) | |
tree | 009f50ecfd2e3c00060714be3a86ffa02c6b0482 /gcc/ada/sem_ch5.adb | |
parent | 75b87c163fccf0fb5ae07c0d34678949c90414f6 (diff) | |
download | gcc-a2c314c72b070a170ade9858c6a0ece2105c4508.zip gcc-a2c314c72b070a170ade9858c6a0ece2105c4508.tar.gz gcc-a2c314c72b070a170ade9858c6a0ece2105c4508.tar.bz2 |
[multiple changes]
2015-10-26 Bob Duff <duff@adacore.com>
* snames.ads-tmpl, aspects.adb, aspects.ads: Add the aspect and
pragma names and enter into relevant tables.
* sem_ch13.adb (Analyze_Aspect_Specifications): Analyze aspect
Predicate_Failure.
* sem_prag.adb (Predicate_Failure): Analyze pragma Predicate_Failure.
* exp_util.adb (Make_Predicate_Check): When building the Check
pragma, if Predicate_Failure has been specified, add the relevant
String argument to the pragma.
* par-prag.adb (Prag): Add Predicate_Failure to list of pragmas
handled during semantic analysis.
2015-10-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Assignment): If the left-hand side
is an indexed component with generalized indexing, discard
interpretation that yields a reference type, which is not
assignable. This prevent spurious ambiguities when the right-hand
side is an aggregate which does not provide a target type.
From-SVN: r229358
Diffstat (limited to 'gcc/ada/sem_ch5.adb')
-rw-r--r-- | gcc/ada/sem_ch5.adb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 3e79179..0c9c56e 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -316,7 +316,18 @@ package body Sem_Ch5 is Get_First_Interp (Lhs, I, It); while Present (It.Typ) loop - if Has_Compatible_Type (Rhs, It.Typ) then + -- An indexed component with generalized indexing is always + -- overloaded with the corresponding dereference. Discard + -- the interpretation that yields a reference type, which + -- is not assignable. + + if Nkind (Lhs) = N_Indexed_Component + and then Present (Generalized_Indexing (Lhs)) + and then Has_Implicit_Dereference (It.Typ) + then + null; + + elsif Has_Compatible_Type (Rhs, It.Typ) then if T1 /= Any_Type then -- An explicit dereference is overloaded if the prefix |