aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2007-08-14 10:49:15 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-08-14 10:49:15 +0200
commitf9c0d38ccdfa6044f994ae20098ad48ee2099647 (patch)
tree9ba49586d0b86a87cfec89e2d095f3dcd46235e4
parentd118a43e887ec35891f3a040818afd40456ada5c (diff)
downloadgcc-f9c0d38ccdfa6044f994ae20098ad48ee2099647.zip
gcc-f9c0d38ccdfa6044f994ae20098ad48ee2099647.tar.gz
gcc-f9c0d38ccdfa6044f994ae20098ad48ee2099647.tar.bz2
sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a generated interface thunk.
2007-08-14 Javier Miranda <miranda@adacore.com> * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a generated interface thunk. From-SVN: r127459
-rw-r--r--gcc/ada/sem_disp.adb15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
index 3b2a18a..e0f384a 100644
--- a/gcc/ada/sem_disp.adb
+++ b/gcc/ada/sem_disp.adb
@@ -593,8 +593,9 @@ package body Sem_Disp is
Typ := Etype (E);
end if;
- if not Is_Class_Wide_Type (Typ)
+ if Comes_From_Source (Subp)
and then Is_Interface (Typ)
+ and then not Is_Class_Wide_Type (Typ)
and then not Is_Derived_Type (Typ)
and then not Is_Generic_Type (Typ)
and then not In_Instance
@@ -1211,7 +1212,11 @@ package body Sem_Disp is
function Is_Dynamically_Tagged (N : Node_Id) return Boolean is
begin
- return Find_Controlling_Arg (N) /= Empty;
+ if Nkind (N) = N_Error then
+ return False;
+ else
+ return Find_Controlling_Arg (N) /= Empty;
+ end if;
end Is_Dynamically_Tagged;
--------------------------
@@ -1338,7 +1343,11 @@ package body Sem_Disp is
if Prim = New_Op then
null;
- elsif Present (Abstract_Interface_Alias (Prim))
+ -- Note: The check on Is_Subprogram protects the frontend against
+ -- reading attributes in entities that are not yet fully decorated
+
+ elsif Is_Subprogram (Prim)
+ and then Present (Abstract_Interface_Alias (Prim))
and then Alias (Prim) = Prev_Op
then
Set_Alias (Prim, New_Op);