aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2004-02-26 15:34:05 +0000
committerAndrew Haley <aph@gcc.gnu.org>2004-02-26 15:34:05 +0000
commitbddefd4f80c73d80c3370a71ebb351b1acc164c1 (patch)
tree0c8713946b3a16d29998db9a16e78a4d0fd9009c /gcc/java/class.c
parent50106e8f8d39cd8bead63c0c17608964fef2b27a (diff)
downloadgcc-bddefd4f80c73d80c3370a71ebb351b1acc164c1.zip
gcc-bddefd4f80c73d80c3370a71ebb351b1acc164c1.tar.gz
gcc-bddefd4f80c73d80c3370a71ebb351b1acc164c1.tar.bz2
re PR java/14231 (Incorrect interface method called when compiling against .class files)
2004-02-26 Andrew Haley <aph@redhat.com> PR java/14231: * parse.y (check_interface_throws_clauses): Check for !METHOD_INVISIBLE (iface_method). * class.c (layout_class_methods): Check for CLASS_INTERFACE as well as CLASS_ABSTRACT. From-SVN: r78505
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index f6471ef..be9958b 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -2053,7 +2053,7 @@ void
layout_class_methods (tree this_class)
{
tree method_decl, dtable_count;
- tree super_class;
+ tree super_class, type_name;
if (TYPE_NVIRTUALS (this_class))
return;
@@ -2070,7 +2070,8 @@ layout_class_methods (tree this_class)
else
dtable_count = integer_zero_node;
- if (CLASS_ABSTRACT (TYPE_NAME (this_class)))
+ type_name = TYPE_NAME (this_class);
+ if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
{
/* An abstract class can have methods which are declared only in
an implemented interface. These are called "Miranda