diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 10:26:40 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-29 10:26:40 +0200 |
commit | 7cc83cd8a5c38ed353c5f54cea9888727a77d14e (patch) | |
tree | 346341548f7130d647af93fb48735fb72298d137 /gcc | |
parent | 76af4137543b2654c2aeb91c4987590fff8546db (diff) | |
download | gcc-7cc83cd8a5c38ed353c5f54cea9888727a77d14e.zip gcc-7cc83cd8a5c38ed353c5f54cea9888727a77d14e.tar.gz gcc-7cc83cd8a5c38ed353c5f54cea9888727a77d14e.tar.bz2 |
[multiple changes]
2011-08-29 Steve Baird <baird@adacore.com>
* exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
for CodePeer and ALFA modes.
2011-08-29 Ed Schonberg <schonberg@adacore.com>
* sem_type.adb (Collect_Interps): Within an instance, collect a homonym
that comes from an enclosing scope if it is not the renaming of an
actual, to handle properly a spurious ambiguity in an instance.
From-SVN: r178158
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sem_type.adb | 9 |
3 files changed, 23 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a2c0368..9dc4191 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2011-08-29 Steve Baird <baird@adacore.com> + + * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion + for CodePeer and ALFA modes. + +2011-08-29 Ed Schonberg <schonberg@adacore.com> + + * sem_type.adb (Collect_Interps): Within an instance, collect a homonym + that comes from an enclosing scope if it is not the renaming of an + actual, to handle properly a spurious ambiguity in an instance. + 2011-08-29 Eric Botcazou <ebotcazou@adacore.com> * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to... diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index b2984b7..230e76e 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -6200,6 +6200,11 @@ package body Exp_Ch4 is -- shifts etc. We also do this transformation if the result type is -- different from the base type. + if CodePeer_Mode or ALFA_Mode then + -- CodePeer and GNATprove want to see the unexpanded N_Op_Expon node + return; + end if; + if Is_Private_Type (Etype (Base)) or else Is_Private_Type (Typ) diff --git a/gcc/ada/sem_type.adb b/gcc/ada/sem_type.adb index d11767b..c4d42a3 100644 --- a/gcc/ada/sem_type.adb +++ b/gcc/ada/sem_type.adb @@ -621,10 +621,15 @@ package body Sem_Type is -- A homograph in the same scope can occur within an -- instantiation, the resulting ambiguity has to be - -- resolved later. + -- resolved later. The homographs may both be local + -- functions or actuals, or may be declared at different + -- levels within the instance. The renaming of an actual + -- within the instance must not be included. - if Scope (H) = Scope (Ent) + if (Scope (H) = Scope (Ent) + or else Scope (H) = Scope (Scope (Ent))) and then In_Instance + and then H /= Renamed_Entity (Ent) and then not Is_Inherited_Operation (H) then All_Interp.Table (All_Interp.Last) := |