summaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-22 20:53:54 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2003-01-22 20:53:54 +0000
commit28cacd2dfa89f2d82bd7051baa0030668a97c05c (patch)
tree248e3b9f3c1ecd6b696b4ed1a06894a6a1561839 /gcc/java/expr.c
parentcaa8fa373e7ffb8f83d65cede231ca2a28818d2d (diff)
downloadgcc-28cacd2dfa89f2d82bd7051baa0030668a97c05c.tar.gz
* expr.c (build_invokeinterface): Abort if method's context is not
an interface. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61615 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index e5c677c2c11..bf1f41b5414 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1901,15 +1901,16 @@ build_invokeinterface (tree dtable, tree method)
abstract nor static. */
if (class_ident == NULL_TREE)
- {
- class_ident = get_identifier ("class");
- }
+ class_ident = get_identifier ("class");
- dtable = build_java_indirect_ref (dtable_type, dtable, flag_check_references);
+ dtable = build_java_indirect_ref (dtable_type, dtable,
+ flag_check_references);
dtable = build (COMPONENT_REF, class_ptr_type, dtable,
lookup_field (&dtable_type, class_ident));
interface = DECL_CONTEXT (method);
+ if (! CLASS_INTERFACE (TYPE_NAME (interface)))
+ abort ();
layout_class_methods (interface);
if (flag_indirect_dispatch)