Commit 7cc83cd8 by Arnaud Charlet

[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
parent 76af4137
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> 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to... * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
......
...@@ -6200,6 +6200,11 @@ package body Exp_Ch4 is ...@@ -6200,6 +6200,11 @@ package body Exp_Ch4 is
-- shifts etc. We also do this transformation if the result type is -- shifts etc. We also do this transformation if the result type is
-- different from the base type. -- 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)) if Is_Private_Type (Etype (Base))
or else or else
Is_Private_Type (Typ) Is_Private_Type (Typ)
......
...@@ -621,10 +621,15 @@ package body Sem_Type is ...@@ -621,10 +621,15 @@ package body Sem_Type is
-- A homograph in the same scope can occur within an -- A homograph in the same scope can occur within an
-- instantiation, the resulting ambiguity has to be -- 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 In_Instance
and then H /= Renamed_Entity (Ent)
and then not Is_Inherited_Operation (H) and then not Is_Inherited_Operation (H)
then then
All_Interp.Table (All_Interp.Last) := All_Interp.Table (All_Interp.Last) :=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment